Open junderw opened 10 months ago
It might not be what you want, but you can disable the default features when working on the WASM part, which will make std
go away.
The other option I can see is to use two VS Code workspaces, one with the library, and one with both, and disable the default features in the workspace settings for the latter.
That is currently not possible, configs are global only until #13529 is done
I have a workspace with 2 crates.
std
which I can turn off for no_std, and also by default arand
feature that includes the rand crate.wasm32-unknown-unknown
. This depends on crate 1 with default-features = false (to allow no_std)The WASM binary replaces the
#[panic_handler]
andcargo check
andcargo build
throw no errors.However, rust-analyzer gives me an error on the panic handler:
Here's the repo: https://github.com/bitcoinjs/tiny-secp256k1/tree/wip/modular (note: the
wip/modular
branch) (I've committed the .cargo folder and .vscode folder)