Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: namada to compile to wasm32-unknown-unknown #1660

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion ethereum_bridge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ rand.workspace = true
rust_decimal.workspace = true
rust_decimal_macros.workspace = true
tendermint = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "b7d1e5afc6f2ccb3fd1545c2174bab1cc48d7fa7", optional = true}
tendermint-rpc = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "b7d1e5afc6f2ccb3fd1545c2174bab1cc48d7fa7", features = ["http-client"], optional = true}
tendermint-rpc = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "b7d1e5afc6f2ccb3fd1545c2174bab1cc48d7fa7", default-features = false, features = ["trait-client"], optional = true}
tendermint-proto = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "b7d1e5afc6f2ccb3fd1545c2174bab1cc48d7fa7", optional = true}
tracing = "0.1.30"

Expand Down
2 changes: 2 additions & 0 deletions shared/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ namada-sdk = [
"masp-tx-gen",
"ferveo-tpke",
"masp_primitives/transparent-inputs",
"wasmtimer"
]

multicore = ["masp_proofs/multicore"]
Expand Down Expand Up @@ -136,6 +137,7 @@ tiny-hderive.workspace = true
tokio.workspace = true
toml.workspace = true
tracing.workspace = true
wasmtimer = {version = "0.2.0", optional = true}
wasmer = {version = "=2.2.0", optional = true}
wasmer-cache = {version = "=2.2.0", optional = true}
wasmer-compiler-singlepass = {version = "=2.2.0", optional = true}
Expand Down
12 changes: 4 additions & 8 deletions shared/src/types/control_flow/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,24 +334,20 @@ mod internal {
use std::future::Future;
pub use std::time::Duration;

pub use wasm_timer::Instant;
use wasm_timer::{Delay, TryFutureExt};
pub use wasmtimer::std::Instant;
use wasmtimer::tokio::{sleep, timeout_at};

#[inline]
pub(super) async fn internal_timeout_at<F: Future>(
deadline: Instant,
future: F,
) -> Result<F::Output, ()> {
let run_future = async move {
let value = future.await;
Result::<_, std::io::Error>::Ok(value)
};
run_future.timeout_at(deadline).await.map_err(|_| ())
timeout_at(deadline, future).await.map_err(|_| ())
}

#[inline]
pub(super) async fn internal_sleep(dur: Duration) {
_ = Delay::new(dur).await;
_ = sleep(dur).await;
}
}

Expand Down
51 changes: 46 additions & 5 deletions wasm/Cargo.lock

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

Loading