v0.7.0
⚠️ Breaking changes ⚠️
There are two breaking changes in this release.
1. cargo-component-bindings
removed
This breaking change requires manual intervention for existing cargo-component
projects to get those projects to build with this release.
cargo-component-bindings
has been removed as a dependency; bindings are now directly generated into a src/bindings.rs
submodule by cargo-component
with no macro involved.
Existing cargo-component
projects can be fixed with the following steps:
-
Install the latest
cargo-component
.With the removal of the
upgrade
subcommand (see below), the latest version ofcargo-component
can be installed with eithercargo install cargo-component
orcargo binstall cargo-component
(requirescargo-binstall
). -
Edit
Cargo.toml
:Replace the existing
cargo-component-bindings
dependency with:wit-bindgen = { version = "0.16.0", default-features = false, features = ["realloc"] }
This makes the
wit-bindgen
runtime functions / types available to the generated code (but does not make thewit-bindgen::generate!
macro available). -
Edit
src/main.rs
orsrc/lib.rs
:Depending on the whether the project is a command (
src/main.rs
) or a library (src/lib.rs
), edit the file to replace thecargo_component_bindings::generate!
macro invocation with:mod bindings;
2. cargo component update
subcommand removed.
With the removal of the cargo-component-bindings
crate, the subcommand became a less-functional wrapper around cargo install
.
To update cargo-component
in the future, use cargo install cargo-component
or cargo binstall cargo-component
(requires cargo-binstall
).
Compatibility
- Wasmtime: 17.0.0
- WASI: 0.2.0 (stable preview 2! 🎉)
- Warg (registry support): 0.2.0
What's Changed
- Update crate dependencies. by @peterhuene in #208
- Check workspace with all targets in vscode, emacs configs by @tomasol in #205
- Use current package with
add
,publish
when in a workspace by @tomasol in #206 - Rename
--reactor
to--lib
fornew
subcommand. by @peterhuene in #211 - Remove
cargo_component_bindings
crate. by @peterhuene in #212 - Spawn
cargo add
in thenew
command by @tomasol in #209 - Update the adapter to Wasmtime 17.0 and WASI Preview 2. by @sunfishcode in #213
- Update dependencies to latest. by @peterhuene in #214
- Bump cargo-component to 0.7.0. by @peterhuene in #215
New Contributors
Full Changelog: v0.6.0...v0.7.0