Skip to content

Conversation

@bonzini
Copy link
Contributor

@bonzini bonzini commented Dec 20, 2024

Synchronize the versions of dependencies between .wrap files and Cargo.lock.

This is just a small fix and it doesn't make it possible yet to build with upstream Meson, but 1.7.0 is pretty close. The following pieces are missing:

  • libc's build.rs has to be hand-written
  • features are not unified very well, so meson is confused by async-channel using default-features = false for futures-core
  • cfg() is also not parsed very well, so meson is confused by [target."cfg(not(target_family = \"wasm\"))".dependencies.parking] and does not enable the parking dependency
  • enabling subproject features is not possible anymore in meson 1.7.0 :( therefore zerocopy has to be disabled.

The full set of patches (not upstreamable) is at https://github.com/bonzini/mandelbrot/commits/master

Ignore directories corresponding to the semver level being used.
@bonzini bonzini changed the title Sync cargo lock Sync version of dependencies between Cargo.lock and .wrap files Dec 20, 2024
@bonzini
Copy link
Contributor Author

bonzini commented Jan 12, 2025

Ping :)

Copy link
Owner

@sdroege sdroege left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me otherwise

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Match the version in Cargo.lock.
Match the version in Cargo.lock.
@sdroege sdroege merged commit bc6574d into sdroege:master Jan 12, 2025
@sdroege
Copy link
Owner

sdroege commented Jan 12, 2025

The full set of patches (not upstreamable) is at https://github.com/bonzini/mandelbrot/commits/master

You're working on getting that all ready? Thanks! :)

@bonzini
Copy link
Contributor Author

bonzini commented Jan 12, 2025

Well, for the patches I've not included here I'm leaning towards those being Meson bugs. So I'm using mandelbrot to track the progress in Meson. Some of those patches in my master branch have open PRs in Meson, while for feature resolution I don't have a clear idea of how to proceed.

My thinking was to have a rust.import_cargo_configuration() method that performs global feature resolution, adds subprojects for all entries in Cargo.lock, and possibly adds lints configuration as well based on Cargo.toml. After this you can just use dependency instead of subproject. But this needs more discussions and interactions with the upstream Meson developers.

UPDATE May '25

The only remaining issue for Meson 1.9.0 is the global feature resolution. With the (not intended for upstream) mesonbuild/meson#14660, this can be worked around by enabling futures-core-0.3-rs:feature-std, futures-core-0.3-rs:feature-alloc in project(), as done in #3.

My upstreamable plan for feature resolution is at mesonbuild/meson#14639.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants