Is there a way to have target specific profile options.
I work on a project which has support for both WASM and C-FFI and it would
be grate if there is a way to set
opt-level=2 for the
test profile for
wasm32 target architecture.
This is needed as running the tests on wasm without
roughly 20times longer on the other hand always setting the
test profiles slows down the "normal" non-wasm testing by ~20%.
Currently I kinda work around this by settings
export CARGO_PROFILE_DEV_OPT_LEVEL="2"; export CARGO_PROFILE_TEST_OPT_LEVEL="2" when working on the WASM bindings,
but it's easy to forget and then wonder why your command seem to hang.