I am compiling a few crates to WASM inside a build script so that another host-side crate can depend on the binary WASM files.
At the moment, my build script just creates a new Command for cargo (with a different target dir to avoid a deadlock) and I manually write out all command line args to cargo in code.
Is there a better (typed?) way to achieve this, i.e. is there already a crate that wraps cargo inside a build script and provides a nice API for invoking a nested build? I've tried looking online but have so far come up empty.
I am really excited for when artifact dependencies will become stable (the project that I'm working on atm is my first where I'm actively restricting myself to stable features)
Judging from the current docs (Unstable Features - The Cargo Book), it seems that simple builds should be supported. However, at the moment my WASM artifact build still requires a few extra rustflags to build the crate in release mode (and std) with immediate panic aborts and to strip debug symbols. Do you know if these could be configured declaratively so that the artifact build would just pick them up?