bytecodealliance / wasm-pkg-tools

Apache License 2.0
48 stars 11 forks source link

Add `wasm-pkg-lock` crate #15

Open lann opened 4 months ago

lann commented 4 months ago

This could probably just be adapted from https://github.com/bytecodealliance/cargo-component/blob/main/crates/core/src/lock.rs

Open question: Should there be a single e.g. wasm-pkg.lock file (per workspace) or should each tool pick its own name (like wit.lock today)? Would you ever want different resolved package versions for different tools in the same workspace?

calvinrp commented 4 months ago

I can't imagine that use case, at the moment. Maybe start simple and lazy evaluate if we need to change.

lann commented 4 months ago

Discussed this a bit with @fibonacci1729. There are tradeoffs with both lock-per-tool and one-lock-to-rule-them-all:

I think this is best resolved with prototyping, so I'm proposing the following initial approach:

thomastaylor312 commented 1 week ago

We just merged support for a basic lock file adapted from the wit tool in cargo component with the merge of #91. We can keep this open as we might need to do some more prototyping, but just wanted people to be aware