I'm currently playing around with wasmtime
(GitHub, crates.io.)
While doing so, I wanted to modify the wasmtime-wasi-nn
crate (GitHub, crates.io.), which depends on wasmtime
and lives in the same repository and cargo workspace.
So I did the following:
- clone the
wasmtime
repository (at the commit of the last crates crates.io release) - do some modifications to my local version of
wasmtime-wasi-nn
- patch the
wasmtime-wasi-nn
in my project like this:
[patch.crates-io]
wasmtime-wasi-nn = { path = "../wasmtime/crates/wasi-nn" }
Now I have the problem that there are two incompatible versions of wasmtime
in my dependency tree:
- the crates.io version (direct dependency of my project)
- my local version, on which the my modified
wasmtime-wasi-nn
depends (through[dependencies] wasmtime = { workspace = true ... }
)
I thought that there should be a way to make my local wasmtime-wasi-nn
depend on the crates.io version (without changing it's Cargo.toml
, as i would have to undo these changes if i wanted to contribute my changes back to the repo).
Or perhaps there is another approach that I am overlooking...
I look forward to any suggestions.