This is a hack to prevent the fs2 crate from being compiled on wasm
Adding a bench feature, or using target does not work due to open Cargo issues.
# Wasm-pack requires to change the crate type. Cargo doesn't yet
# support having different crate types depending on the target, so
# we switch there
- printf '\n[lib]\ncrate-type = ["cdylib", "rlib"]' >> Cargo.toml
+ sed -i 's/\[lib\]/[lib]\ncrate-type = ["cdylib", "rlib"]/' Cargo.toml
+
+ sed -i '/utilities/d' Cargo.toml
'';
buildPhase =
