Skip to content

Add options for Rust compiler features and Cargo.toml [profile]#15961

Open
bonzini wants to merge 5 commits into
mesonbuild:masterfrom
bonzini:rust-profile-options
Open

Add options for Rust compiler features and Cargo.toml [profile]#15961
bonzini wants to merge 5 commits into
mesonbuild:masterfrom
bonzini:rust-profile-options

Conversation

@bonzini

@bonzini bonzini commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Add options to Meson that map to features exposed in Cargo.toml's [profile] section.

While [profile] is not super important because it only applies to the top-level workspace (so it corresponds to project options), it is possible to map buildtypes to profiles and therefore declare different code generation options that apply to optimizing and non-optimizing buildtypes.

bonzini added 3 commits June 26, 2026 17:04
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
…cros

This is not supported for tests, so do it unconditionally.  For procedural
macros just set a default value similar to how edition is handled wrt
the value in Cargo.toml.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
@bonzini bonzini added this to the 1.13 milestone Jun 26, 2026
bonzini added 2 commits June 26, 2026 19:09
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
@bonzini bonzini force-pushed the rust-profile-options branch from a55901f to 05e6501 Compare June 26, 2026 17:11
@bonzini bonzini marked this pull request as ready for review June 26, 2026 17:12
@bonzini bonzini requested review from dcbaker and jpakkane as code owners June 26, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant