Stream: SIG-Packaging

Topic: wkg.lock file


view this post on Zulip Brooks Townsend (Aug 27 2024 at 18:09):

Hey @Calvin Prewitt ! I'm working on adding support for pulling component dependencies via wasm-pkg-client to wasmCloud's CLI, and after talking with Taylor last week I heard there's some interest in a wkg.lock file. At the very least, an idea of a lockfile to maintain integrity/track digests/etc. I put a total strawman in https://github.com/wasmCloud/wasmCloud/pull/2879 which is mostly based off of deps.lock from wit-deps to start that conversation :smile:

feat(wash-lib)!: allow wit-world to be optional feat(wash-lib)!: fetch wasm dependencies with wkg Feature or Problem This PR is an initial implementation of using the wasm-pkg-client crate from ht...

view this post on Zulip Calvin Prewitt (Aug 27 2024 at 18:12):

Thanks, @Brooks Townsend . Yeah, looping @Daniel Macovei in as well.

view this post on Zulip Daniel Macovei (Aug 27 2024 at 18:15):

Awesome stuff! Would be cool to chat about plans for it. What would your thoughts be about a .lock living in wasm-pkg-tools? We were also kindof thinking that there are some cool things about the wit tool in cargo-component that might be worth taking inspiration from.

view this post on Zulip Daniel Macovei (Aug 27 2024 at 18:16):

https://github.com/bytecodealliance/cargo-component/tree/main/crates/wit

A Cargo subcommand for creating WebAssembly components based on the component model proposal. - bytecodealliance/cargo-component

view this post on Zulip Brooks Townsend (Aug 27 2024 at 18:18):

Ooh yeah, https://github.com/bytecodealliance/cargo-component/blob/main/crates/wit/src/lock.rs looks like great inspiration. Yeah I think this .lock format should definitely live in wasm-pkg-tools

A Cargo subcommand for creating WebAssembly components based on the component model proposal. - bytecodealliance/cargo-component

view this post on Zulip Daniel Macovei (Aug 27 2024 at 18:20):

If you want you should come to the packaging meeting tomorrow. Or we could hop on a call somewhere else. Or chat here. But it would be cool to exchange some ideas about this. I've been doing a bad job of keeping up to date with Taylor's progress, but I think atm it still only interacts with warg?

view this post on Zulip Brooks Townsend (Aug 27 2024 at 18:26):

I may attend the packaging meeting tomorrow :smile: Taylor's been rocking it, I was able to use this to pull all the wasi@0.2.0 deps via OCI from the released GitHub packages https://github.com/orgs/WebAssembly/packages?repo_name=WASI

GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects.

view this post on Zulip Brooks Townsend (Aug 27 2024 at 18:27):

So in the end after running through my PR I had the components and the lockfile:

 lt wit
Permissions Size User   Date Modified Name
drwxr-xr-x     - brooks 27 Aug 13:56  wit/
drwxr-xr-x     - brooks 27 Aug 13:56  ├── wkg_deps/
.rw-r--r--   26k brooks 27 Aug 13:56    ├── wasi_cli_0.2.0.wasm
.rw-r--r--  3.6k brooks 27 Aug 13:56    ├── wasi_clocks_0.2.0.wasm
.rw-r--r--   29k brooks 27 Aug 13:56    ├── wasi_filesystem_0.2.0.wasm
.rw-r--r--   38k brooks 27 Aug 13:56    ├── wasi_http_0.2.0.wasm
.rw-r--r--   14k brooks 27 Aug 13:56    ├── wasi_io_0.2.0.wasm
.rw-r--r--  3.4k brooks 27 Aug 13:56    ├── wasi_random_0.2.0.wasm
.rw-r--r--   52k brooks 27 Aug 13:56    └── wasi_sockets_0.2.0.wasm
.rw-r--r--  1.3k brooks 27 Aug 13:56  ├── wkg.lock
.rw-r--r--   133 brooks 21 Aug 13:37  └── world.wit

view this post on Zulip Daniel Macovei (Aug 27 2024 at 18:27):

awesome


Last updated: Dec 23 2024 at 12:05 UTC