v0.4.0
⚠️ Breaking changes ⚠️
Mismatched crate versions
This release of cargo-component
contains a breaking change that will lead to build errors if you build a component that uses a mismatched version of the cargo-component-bindings
crate.
If cargo-component
detects a mismatched version, it will print a warning for each manifest in your workspace with an incompatible version.
To correct the issue, please update the version of the cargo-component-bindings
dependency in your Cargo.toml
to 0.4.0
.
We plan to introduce a cargo-component
subcommand to automate upgrades in the future.
Arguments to cargo_component_bindings::generate!
If you are currently passing arguments to the cargo_component_bindings::generate!
macro, the macro no longer accepts arguments and will error if arguments are passed.
To correct this issue, please move any arguments to the [package.metadata.component.bindings]
table in your Cargo.toml
.
The supported settings are:
implementor
: The name of the type to implement world exports on.resources
: A map of resource names to resource implementor types.ownership
: The ownership model to use for generated types.derives
: Additional derive macro attributes to add to generated types.
Compatibility
- Wasmtime: 14.0.0
- Warg (registry support): 0.2.0
What's Changed
This release contains improvements to component build times by reducing the number of dependencies required to build a component.
Additionally, rust-anzlyzer
support is fixed, so changes to local WIT files should now be reflected when rust-analyzer
re-parses Rust source code (i.e. on save of an .rs
file or after a cargo component
invocation).
The "go to definition" functionality provided by rust-analyzer now works with bindings types as we now generate a source file for the definitions rather than relying on a macro expansion.
The prebuilt artifacts associated with the release are now much smaller.
- Reduce the size of published artifacts. by @peterhuene in #166
- Refactor bindings generation. by @peterhuene in #167
- Bump cargo-component version to 0.4.0. by @peterhuene in #168
Full Changelog: v0.3.1...v0.4.0