However, then compiling with -Drs=enabled, the rust parts end up in some target/debug directory and cargo seems to be running with the debug profile, and rustc has -C opt-level=1. If I explicitly say --buildtype release, then rustc gets -C opt-level=3 and also lto and artifacts end up under target/release.
Looking at the gst-plugins-rs/Cargo.toml, we see that the release profile is basically “optimized for speed but with debug info”, which is what I would expect of “debugoptimized” anyway.
Ah you mean why debugoptimized only has minor optimizations and is the same as debug? That seems like a limitation of the cargo/meson wrapper script, and can probably be solved. Please create an issue in gitlab if that’s a concern for you.
Thank you, it’s not really an issue — I just found it a bit confusing and wondered whether the default behavior was this way was intentionally. I guess opt-level = 1 is not “without optimizations”, so it can reasonably be called “debugoptimized”.