You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* add default-enabled std feature
* use parity-wasm/std feature only if std is enabled
* drop dependency on std::io
* use hashmap_core instead of std::collections::HashMap
* disable std::error in no_std
* core and alloc all the things
* mention no_std in readme
* add no_std feature and use hashmap_core only on no_std
* rename the no_std feature to core
* drop dependency on byteorder/std
* simplify float impl macro
* remove some trailing whitespace
* use libm for float math in no_std
* add note about no_std panics of libm to readme
* Embed nan-preserving-float crate.
* Add no_std check to the Travis CI config
* add missing dev-dependency
Copy file name to clipboardExpand all lines: README.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,24 @@ cargo build
27
27
cargo test
28
28
```
29
29
30
+
# `no_std` support
31
+
This crate supports `no_std` environments.
32
+
Enable the `core` feature and disable default features:
33
+
```toml
34
+
[dependencies]
35
+
parity-wasm = {
36
+
version = "0.31",
37
+
default-features = false,
38
+
features = "core"
39
+
}
40
+
```
41
+
42
+
The `core` feature requires the `core` and `alloc` libraries and a nightly compiler.
43
+
Also, code related to `std::error` is disabled.
44
+
45
+
Floating point operations in `no_std` use [`libm`](https://crates.io/crates/libm), which sometimes panics in debug mode (https://github.com/japaric/libm/issues/4).
46
+
So make sure to either use release builds or avoid WASM with floating point operations, for example by using [`deny_floating_point`](https://docs.rs/wasmi/0.4.0/wasmi/struct.Module.html#method.deny_floating_point).
47
+
30
48
## Contribution
31
49
32
50
Unless you explicitly state otherwise, any contribution intentionally submitted
0 commit comments