Updated top-level README.rst

This commit is contained in:
Lachlan Sneff
2018-01-15 18:32:27 -05:00
committed by Dan Gohman
parent 2462a065ad
commit 6bd6a80b78

View File

@@ -57,6 +57,37 @@ You may need to install the *wat2wasm* tool from the `wabt
WebAssembly tests. Tests requiring wat2wasm are ignored if the tool is not WebAssembly tests. Tests requiring wat2wasm are ignored if the tool is not
installed. installed.
Building with `no_std`
----------------------
To build cretonne without libstd, enable the `no_std` feature on `lib/cretonne`,
`lib/frontend`, `lib/native`, and `lib/wasm`.
For example, to build `cretonne`:
cd lib/cretonne
cargo build --features no_std
Or, when using `cretonne` as a dependency (in Cargo.toml):
[dependency.cretonne]
path = "..."
features = ["no_std"]
Currently, tests don't test the `no_std` feature.
It's important to note that cretonne still needs liballoc to compile.
Thus, whatever environment is used must implement an allocator.
Also, to allow the use of HashMaps in `no_std` mode, an external crate
called `hashmap_core` is pulled in (only in `no_std` builds). This
is mostly the same as `std::collections::HashMap`, except that it doesn't
have DOS protection. Just something to think about.
Lastly, to support `std::error`, which isn't is `std` or `alloc` for
an inexplicable reason, the `error_core` crate is also used in `no_std` builds.
You might need it, as well, when interfacing with `CtonError`.
Building the documentation Building the documentation
-------------------------- --------------------------