Cargo Features

lucet-wasi has no features set by default.

[dependencies]
lucet-wasi = { version = "0.6.1", features = ["update-bindings"] }

src/wasi_host.rs is automatically generated using clang and wasi-libc headers. This requires these to be present, and installed at specific paths, which is not something we can rely on outside of our environment. So, we follow what most other tools using bindgen do, and provide a pre-generated version of the file, along with a way to update it. This is what the update-bindings feature do. It requires the WASI SDK to be either installed in /opt/wasi-sdk, or at a location defined by a WASI_SDK environment variable, as well as clang headers either being part of WASI_SDK, or found in a path defined by a CLANG_ROOT environment variable.

update-bindings = bindgen

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

bindgen build update-bindings?

Enables bindgen ^0.51.1