Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add instructions for updating wasmtime #322

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions bazel/cargo/wasmtime/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

# Updating `wasmtime`

Projects depending upon `proxy-wasm-cpp-host` and `wasmtime` should
ensure that the `wasmtime` dependency here is updated whenever updating
`proxy-wasm-cpp-host`.

## Install `rust`

Ensure you have the latest version of rust.

```console
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
$ rustup update
```

## Install `cargo-raze`

```console
$ cargo install cargo-raze --version 0.14.1.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$ cargo install cargo-raze --version 0.14.1.
$ cargo install cargo-raze --version 0.14.1

```

## Generate lockfile

```console
$ cd bazel/cargo/wasmtime
$ cargo raze --generate-lockfile
$ cd ../..
```

## Resolve duplicates in lockfile

Currently due to an issue with raze (https://github.com/google/cargo-raze/issues/451) it
is likely that you will need to clear up any duplicates created in the lockfile.

Resolving this issue can be tricky as updates can generate a lot of change, but essentially
you will need to check the overall diff for any problematic files and check to see where new
dependencies have been added.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@PiotrSikora this feels pretty unsatisfactory but looking over the actual diffs (and checking through my/others attempts to resolve) im not clear what the process here should be

when we recently updated this - i seem to rem right at the end a penny dropping and thinking "ok, got it" but im not sure what that was now or how to describe in a way that will work given the different possibilities regenerating the file has.

is there any way we could resolve the upstream raze issue ?


## Commit changes

```console
$ git add bazel/cargo/wasmtime
$ git commit ...
```