Upgrade wit-bindgen dependencies to 0.51.0#98
Merged
Conversation
Update wasmtime to the latest major version (41.0) and the corresponding wit-bindgen-core/wit-bindgen-rust to 0.51.0 for compatibility. wit-bindgen-rt stays at 0.44.0 as it is the latest published version of that crate. Fix durable-bindgen to adapt to wit-bindgen API changes: - Import WorldGenerator trait (now required explicitly) - Import Files type explicitly (no longer inferred) - Adapt to push_dir returning a single PackageId instead of Vec https://claude.ai/code/session_0141LHtG2yXG9WCvYgxFfXyh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR upgrades the wit-bindgen crate dependencies from version 0.44.0 to 0.51.0, along with wasmtime from 36.0 to 41.0. The upgrade includes necessary code changes to adapt to API changes in the newer wit-bindgen versions.
Key Changes
wit-bindgen-coreandwit-bindgen-rustdependencies from 0.44.0 to 0.51.0wasmtimedependency from 36.0 to 41.0FilesandWorldGeneratorfrom wit-bindgen-core to support the updated APIresolve.push_dir()return value handling: now returns a singlepackageinstead ofpackagesvectorresolve.select_world()call to pass a slice reference&[package]instead of thepackagesvectorDefault::default()with explicitFiles::default()type annotation for clarityImplementation Details
The main API change in wit-bindgen 0.51.0 appears to be in how the resolver handles package directories. The
push_dir()method now returns a single package rather than a vector of packages, requiring the caller to wrap it in a slice when passing toselect_world(). The explicitFiles::default()call ensures type safety with the updated API.https://claude.ai/code/session_0141LHtG2yXG9WCvYgxFfXyh