Cargo : any effect of [profile.release] on wasm target?

I see no effect of these options on the build of wasm file. Is it that possible it has no effect?

opt-level = "z"
lto = true
panic = "abort"

As well as I don't see an effect of this:

opt-level = "s"

What could be wrong with my cargo file?
I run it in this way:

command = "cargo"
args = [
  "--manifest-path", "${CARGO_MAKE_CURRENT_TASK_INITIAL_MAKEFILE_DIRECTORY}/../../Cargo.toml",
  "--bin", "web",
  "--target", "wasm32-unknown-unknown",
  "--features", "web",
  "--profile", "release",

I think I know. Reason of having no effect could be in workspace. This module is part of workspace that's why every profiles are ignored. Does it make sense?

1 Like

Yes, Cargo is suprisingly bad at warning of unused or overridden settings. In this instance, a [profile] is only taken into account if written within a [workspace] manifest file

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.