Skip to content

v0.4.0

Compare
Choose a tag to compare
@peterhuene peterhuene released this 27 Oct 22:12
· 104 commits to main since this release
821c329

⚠️ 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.

Full Changelog: v0.3.1...v0.4.0