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

Use instant to get time for wasm32 target #13

Merged
merged 3 commits into from
Oct 18, 2023

Conversation

fl0rek
Copy link
Member

@fl0rek fl0rek commented Oct 17, 2023

When compiled for wasm32, getting time from standard library causees panic. Use instant crate to get time when compiling for wasm32 instead.

@fl0rek fl0rek requested review from oblique and zvolin October 17, 2023 19:39
@@ -53,10 +53,13 @@ sha2 = { version = "0.10", optional = true, default-features = false }
k256 = { version = "0.13", optional = true, default-features = false, features = ["alloc", "ecdsa"] }
ripemd = { version = "0.1.3", optional = true, default-features = false }

[target.'cfg(target_arch = "wasm32")'.dependencies]
instant = { version = "0.1", features = [ "wasm-bindgen" ], optional = true}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should define wasm-bindgen in a higher level

Suggested change
instant = { version = "0.1", features = [ "wasm-bindgen" ], optional = true}
instant = { version = "0.1", optional = true}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added wasm-bindgen feature to tendermint, which enables instant/wasm-bindgen

fl0rek and others added 2 commits October 18, 2023 09:02
Co-authored-by: Yiannis Marangos <psyberbits@gmail.com>
@oblique oblique merged commit ef58b85 into v0.32.x-celestia Oct 18, 2023
This was referenced Jan 10, 2024
@zvolin zvolin mentioned this pull request Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants