Skip to content

Commit

Permalink
Revert "chore: Don't use a fork of async-compat for the bindings anym…
Browse files Browse the repository at this point in the history
…ore"

This reverts commit 058f05b.
  • Loading branch information
poljar committed Oct 4, 2024
1 parent 1f70ec7 commit b5f510a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
5 changes: 2 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ inherits = "dbg"
opt-level = 3

[patch.crates-io]
async-compat = { git = "https://github.com/jplatte/async-compat", rev = "16dc8597ec09a6102d58d4e7b67714a35dd0ecb8" }
const_panic = { git = "https://github.com/jplatte/const_panic", rev = "9024a4cb3eac45c1d2d980f17aaee287b17be498" }
# Needed to fix rotation log issue on Android (https://github.com/tokio-rs/tracing/issues/2937)
tracing = { git = "https://github.com/element-hq/tracing.git", rev = "ca9431f74d37c9d3b5e6a9f35b2c706711dab7dd"}
Expand Down
2 changes: 1 addition & 1 deletion bindings/matrix-sdk-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ vergen = { version = "8.1.3", features = ["build", "git", "gitcl"] }
[dependencies]
anyhow = { workspace = true }
as_variant = { workspace = true }
async-compat = "0.2.4"
async-compat = "0.2.1"
eyeball-im = { workspace = true }
extension-trait = "1.0.1"
futures-util = { workspace = true }
Expand Down
9 changes: 1 addition & 8 deletions bindings/matrix-sdk-ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,17 @@ mod tracing;
mod utils;
mod widget;

use async_compat::TOKIO1 as RUNTIME;
use matrix_sdk::ruma::events::room::{
message::RoomMessageEventContentWithoutRelation, MediaSource,
};
use once_cell::sync::Lazy;

use self::{
error::ClientError,
ruma::{MediaSourceExt, Mentions, RoomMessageEventContentWithoutRelationExt},
task_handle::TaskHandle,
};

static RUNTIME: Lazy<tokio::runtime::Runtime> = Lazy::new(|| {
tokio::runtime::Builder::new_current_thread()
.enable_all()
.build()
.expect("Could not build a Tokio runtime")
});

uniffi::include_scaffolding!("api");

#[uniffi::export]
Expand Down

0 comments on commit b5f510a

Please sign in to comment.