Stream: git-wasmtime

Topic: wasmtime / issue #6583 Implement resources for the compon...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 14 2023 at 16:58):

alexcrichton opened issue #6583:

This is intended to be a bit of a tracking issue and/or brain-dump about implementing resources in the component model. The work here spans a number of repositories and isn't exclusively limited to just the Wasmtime repository, but I'm choosing here as probably one of the higher-visibility locations to write all this down.

Settle on a spec

Currently as-is in the component-model repository two resource handles of own and borrow are specified but this may change with recent thinking. Settling on this will be necessary for at least completing this work, but isn't necessarily required before any other work goes forward. This will impact the runtime implementation in Wasmtime but likely won't radically change the overall shape, mostly details instead of what each piece is precisely doing.

Implement resources in wasm-tools

Resources have had their initial implementation landed in https://github.com/bytecodealliance/wasm-tools/pull/966 for a number of crates, but not all of them. This implementation will need to be updated depending on how the above spec discussion settles, and the remaining work here is:

Much of this work on wasm-tools is sequentialized and can't be parallelized all that well as each step likely relies on the prior.

Implement resources in Wasmtime

Naturally a big part of resources is the actual runtime impelmentation in Wasmtime! The precise steps involved here are more fuzzy to me than the ones above for wasm-tools, but the rough idea I have at this time is:

Unfortunately I feel like at this point I've sort of gone from "draw a circle" to "finish the owl" and I'm not precisely sure what other intermediate steps there are to implement resources in Wasmtime, despite there obviously being quite a few more steps. One thing I can say though is that the Wasmtime work can, in theory, progress in parallel to the remaining wasm-tools work. Towards the "end" when the bindgen! macro gets involved they'll need to sync back up but it should be possible to implement everything related to resources in Wasmtime independent of WIT and the integration there.


I plan on starting on the wasm-tools based work in the near future and moving outwards from there, but I wanted to be sure to write down my thoughts on all this in the meantime. I can also try to keep this updated over time with more thinking.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 14 2023 at 16:58):

alexcrichton labeled issue #6583:

This is intended to be a bit of a tracking issue and/or brain-dump about implementing resources in the component model. The work here spans a number of repositories and isn't exclusively limited to just the Wasmtime repository, but I'm choosing here as probably one of the higher-visibility locations to write all this down.

Settle on a spec

Currently as-is in the component-model repository two resource handles of own and borrow are specified but this may change with recent thinking. Settling on this will be necessary for at least completing this work, but isn't necessarily required before any other work goes forward. This will impact the runtime implementation in Wasmtime but likely won't radically change the overall shape, mostly details instead of what each piece is precisely doing.

Implement resources in wasm-tools

Resources have had their initial implementation landed in https://github.com/bytecodealliance/wasm-tools/pull/966 for a number of crates, but not all of them. This implementation will need to be updated depending on how the above spec discussion settles, and the remaining work here is:

Much of this work on wasm-tools is sequentialized and can't be parallelized all that well as each step likely relies on the prior.

Implement resources in Wasmtime

Naturally a big part of resources is the actual runtime impelmentation in Wasmtime! The precise steps involved here are more fuzzy to me than the ones above for wasm-tools, but the rough idea I have at this time is:

Unfortunately I feel like at this point I've sort of gone from "draw a circle" to "finish the owl" and I'm not precisely sure what other intermediate steps there are to implement resources in Wasmtime, despite there obviously being quite a few more steps. One thing I can say though is that the Wasmtime work can, in theory, progress in parallel to the remaining wasm-tools work. Towards the "end" when the bindgen! macro gets involved they'll need to sync back up but it should be possible to implement everything related to resources in Wasmtime independent of WIT and the integration there.


I plan on starting on the wasm-tools based work in the near future and moving outwards from there, but I wanted to be sure to write down my thoughts on all this in the meantime. I can also try to keep this updated over time with more thinking.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 21 2023 at 15:13):

alexcrichton edited issue #6583:

This is intended to be a bit of a tracking issue and/or brain-dump about implementing resources in the component model. The work here spans a number of repositories and isn't exclusively limited to just the Wasmtime repository, but I'm choosing here as probably one of the higher-visibility locations to write all this down.

Settle on a spec

Currently as-is in the component-model repository two resource handles of own and borrow are specified but this may change with recent thinking. Settling on this will be necessary for at least completing this work, but isn't necessarily required before any other work goes forward. This will impact the runtime implementation in Wasmtime but likely won't radically change the overall shape, mostly details instead of what each piece is precisely doing.

Implement resources in wasm-tools

Resources have had their initial implementation landed in https://github.com/bytecodealliance/wasm-tools/pull/966 for a number of crates, but not all of them. This implementation will need to be updated depending on how the above spec discussion settles, and the remaining work here is:

Much of this work on wasm-tools is sequentialized and can't be parallelized all that well as each step likely relies on the prior.

Implement resources in Wasmtime

Naturally a big part of resources is the actual runtime impelmentation in Wasmtime! The precise steps involved here are more fuzzy to me than the ones above for wasm-tools, but the rough idea I have at this time is:

Unfortunately I feel like at this point I've sort of gone from "draw a circle" to "finish the owl" and I'm not precisely sure what other intermediate steps there are to implement resources in Wasmtime, despite there obviously being quite a few more steps. One thing I can say though is that the Wasmtime work can, in theory, progress in parallel to the remaining wasm-tools work. Towards the "end" when the bindgen! macro gets involved they'll need to sync back up but it should be possible to implement everything related to resources in Wasmtime independent of WIT and the integration there.


I plan on starting on the wasm-tools based work in the near future and moving outwards from there, but I wanted to be sure to write down my thoughts on all this in the meantime. I can also try to keep this updated over time with more thinking.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 21 2023 at 15:13):

alexcrichton edited issue #6583:

This is intended to be a bit of a tracking issue and/or brain-dump about implementing resources in the component model. The work here spans a number of repositories and isn't exclusively limited to just the Wasmtime repository, but I'm choosing here as probably one of the higher-visibility locations to write all this down.

Settle on a spec

Currently as-is in the component-model repository two resource handles of own and borrow are specified but this may change with recent thinking. Settling on this will be necessary for at least completing this work, but isn't necessarily required before any other work goes forward. This will impact the runtime implementation in Wasmtime but likely won't radically change the overall shape, mostly details instead of what each piece is precisely doing.

Implement resources in wasm-tools

Resources have had their initial implementation landed in https://github.com/bytecodealliance/wasm-tools/pull/966 for a number of crates, but not all of them. This implementation will need to be updated depending on how the above spec discussion settles, and the remaining work here is:

Much of this work on wasm-tools is sequentialized and can't be parallelized all that well as each step likely relies on the prior.

Implement resources in Wasmtime

Naturally a big part of resources is the actual runtime impelmentation in Wasmtime! The precise steps involved here are more fuzzy to me than the ones above for wasm-tools, but the rough idea I have at this time is:

Unfortunately I feel like at this point I've sort of gone from "draw a circle" to "finish the owl" and I'm not precisely sure what other intermediate steps there are to implement resources in Wasmtime, despite there obviously being quite a few more steps. One thing I can say though is that the Wasmtime work can, in theory, progress in parallel to the remaining wasm-tools work. Towards the "end" when the bindgen! macro gets involved they'll need to sync back up but it should be possible to implement everything related to resources in Wasmtime independent of WIT and the integration there.


I plan on starting on the wasm-tools based work in the near future and moving outwards from there, but I wanted to be sure to write down my thoughts on all this in the meantime. I can also try to keep this updated over time with more thinking.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 21 2023 at 15:13):

alexcrichton edited issue #6583:

This is intended to be a bit of a tracking issue and/or brain-dump about implementing resources in the component model. The work here spans a number of repositories and isn't exclusively limited to just the Wasmtime repository, but I'm choosing here as probably one of the higher-visibility locations to write all this down.

Settle on a spec

Currently as-is in the component-model repository two resource handles of own and borrow are specified but this may change with recent thinking. Settling on this will be necessary for at least completing this work, but isn't necessarily required before any other work goes forward. This will impact the runtime implementation in Wasmtime but likely won't radically change the overall shape, mostly details instead of what each piece is precisely doing.

Implement resources in wasm-tools

Resources have had their initial implementation landed in https://github.com/bytecodealliance/wasm-tools/pull/966 for a number of crates, but not all of them. This implementation will need to be updated depending on how the above spec discussion settles, and the remaining work here is:

Much of this work on wasm-tools is sequentialized and can't be parallelized all that well as each step likely relies on the prior.

Implement resources in Wasmtime

Naturally a big part of resources is the actual runtime impelmentation in Wasmtime! The precise steps involved here are more fuzzy to me than the ones above for wasm-tools, but the rough idea I have at this time is:

Unfortunately I feel like at this point I've sort of gone from "draw a circle" to "finish the owl" and I'm not precisely sure what other intermediate steps there are to implement resources in Wasmtime, despite there obviously being quite a few more steps. One thing I can say though is that the Wasmtime work can, in theory, progress in parallel to the remaining wasm-tools work. Towards the "end" when the bindgen! macro gets involved they'll need to sync back up but it should be possible to implement everything related to resources in Wasmtime independent of WIT and the integration there.


I plan on starting on the wasm-tools based work in the near future and moving outwards from there, but I wanted to be sure to write down my thoughts on all this in the meantime. I can also try to keep this updated over time with more thinking.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 21 2023 at 15:13):

alexcrichton edited issue #6583:

This is intended to be a bit of a tracking issue and/or brain-dump about implementing resources in the component model. The work here spans a number of repositories and isn't exclusively limited to just the Wasmtime repository, but I'm choosing here as probably one of the higher-visibility locations to write all this down.

Settle on a spec

Currently as-is in the component-model repository two resource handles of own and borrow are specified but this may change with recent thinking. Settling on this will be necessary for at least completing this work, but isn't necessarily required before any other work goes forward. This will impact the runtime implementation in Wasmtime but likely won't radically change the overall shape, mostly details instead of what each piece is precisely doing.

Implement resources in wasm-tools

Resources have had their initial implementation landed in https://github.com/bytecodealliance/wasm-tools/pull/966 for a number of crates, but not all of them. This implementation will need to be updated depending on how the above spec discussion settles, and the remaining work here is:

Much of this work on wasm-tools is sequentialized and can't be parallelized all that well as each step likely relies on the prior.

Implement resources in Wasmtime

Naturally a big part of resources is the actual runtime impelmentation in Wasmtime! The precise steps involved here are more fuzzy to me than the ones above for wasm-tools, but the rough idea I have at this time is:

Unfortunately I feel like at this point I've sort of gone from "draw a circle" to "finish the owl" and I'm not precisely sure what other intermediate steps there are to implement resources in Wasmtime, despite there obviously being quite a few more steps. One thing I can say though is that the Wasmtime work can, in theory, progress in parallel to the remaining wasm-tools work. Towards the "end" when the bindgen! macro gets involved they'll need to sync back up but it should be possible to implement everything related to resources in Wasmtime independent of WIT and the integration there.


I plan on starting on the wasm-tools based work in the near future and moving outwards from there, but I wanted to be sure to write down my thoughts on all this in the meantime. I can also try to keep this updated over time with more thinking.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 21 2023 at 15:13):

alexcrichton edited issue #6583:

This is intended to be a bit of a tracking issue and/or brain-dump about implementing resources in the component model. The work here spans a number of repositories and isn't exclusively limited to just the Wasmtime repository, but I'm choosing here as probably one of the higher-visibility locations to write all this down.

Settle on a spec

Currently as-is in the component-model repository two resource handles of own and borrow are specified but this may change with recent thinking. Settling on this will be necessary for at least completing this work, but isn't necessarily required before any other work goes forward. This will impact the runtime implementation in Wasmtime but likely won't radically change the overall shape, mostly details instead of what each piece is precisely doing.

Implement resources in wasm-tools

Resources have had their initial implementation landed in https://github.com/bytecodealliance/wasm-tools/pull/966 for a number of crates, but not all of them. This implementation will need to be updated depending on how the above spec discussion settles, and the remaining work here is:

Much of this work on wasm-tools is sequentialized and can't be parallelized all that well as each step likely relies on the prior.

Implement resources in Wasmtime

Naturally a big part of resources is the actual runtime impelmentation in Wasmtime! The precise steps involved here are more fuzzy to me than the ones above for wasm-tools, but the rough idea I have at this time is:

Unfortunately I feel like at this point I've sort of gone from "draw a circle" to "finish the owl" and I'm not precisely sure what other intermediate steps there are to implement resources in Wasmtime, despite there obviously being quite a few more steps. One thing I can say though is that the Wasmtime work can, in theory, progress in parallel to the remaining wasm-tools work. Towards the "end" when the bindgen! macro gets involved they'll need to sync back up but it should be possible to implement everything related to resources in Wasmtime independent of WIT and the integration there.


I plan on starting on the wasm-tools based work in the near future and moving outwards from there, but I wanted to be sure to write down my thoughts on all this in the meantime. I can also try to keep this updated over time with more thinking.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 30 2023 at 18:42):

alexcrichton commented on issue #6583:

As a bit of an update on this the main bulk of the work for wasm-tools is posted at https://github.com/bytecodealliance/wasm-tools/pull/1084 and the main missing piece in wasm-tools is wasm-compose. I've since been working on an implementation in Wasmtime and continue to be hard at work on that. Progress is apace but currently no ETA. I've got some stuff working but still need to figure out things like destructors, borrow, fused adapters, and the specifics of the embedder API.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 14 2023 at 17:03):

alexcrichton commented on issue #6583:

The initial wasmtime work should now be complete at https://github.com/bytecodealliance/wasmtime/pull/6691 (pending review of course). I plan on closing this issue when that's merged and deferring further work to the linked issues from that PR.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 17 2023 at 14:29):

alexcrichton edited issue #6583:

This is intended to be a bit of a tracking issue and/or brain-dump about implementing resources in the component model. The work here spans a number of repositories and isn't exclusively limited to just the Wasmtime repository, but I'm choosing here as probably one of the higher-visibility locations to write all this down.

Settle on a spec

Currently as-is in the component-model repository two resource handles of own and borrow are specified but this may change with recent thinking. Settling on this will be necessary for at least completing this work, but isn't necessarily required before any other work goes forward. This will impact the runtime implementation in Wasmtime but likely won't radically change the overall shape, mostly details instead of what each piece is precisely doing.

Implement resources in wasm-tools

Resources have had their initial implementation landed in https://github.com/bytecodealliance/wasm-tools/pull/966 for a number of crates, but not all of them. This implementation will need to be updated depending on how the above spec discussion settles, and the remaining work here is:

Much of this work on wasm-tools is sequentialized and can't be parallelized all that well as each step likely relies on the prior.

Implement resources in Wasmtime

Naturally a big part of resources is the actual runtime impelmentation in Wasmtime! The precise steps involved here are more fuzzy to me than the ones above for wasm-tools, but the rough idea I have at this time is:

Unfortunately I feel like at this point I've sort of gone from "draw a circle" to "finish the owl" and I'm not precisely sure what other intermediate steps there are to implement resources in Wasmtime, despite there obviously being quite a few more steps. One thing I can say though is that the Wasmtime work can, in theory, progress in parallel to the remaining wasm-tools work. Towards the "end" when the bindgen! macro gets involved they'll need to sync back up but it should be possible to implement everything related to resources in Wasmtime independent of WIT and the integration there.


I plan on starting on the wasm-tools based work in the near future and moving outwards from there, but I wanted to be sure to write down my thoughts on all this in the meantime. I can also try to keep this updated over time with more thinking.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 17 2023 at 14:29):

alexcrichton edited issue #6583:

This is intended to be a bit of a tracking issue and/or brain-dump about implementing resources in the component model. The work here spans a number of repositories and isn't exclusively limited to just the Wasmtime repository, but I'm choosing here as probably one of the higher-visibility locations to write all this down.

Settle on a spec

Currently as-is in the component-model repository two resource handles of own and borrow are specified but this may change with recent thinking. Settling on this will be necessary for at least completing this work, but isn't necessarily required before any other work goes forward. This will impact the runtime implementation in Wasmtime but likely won't radically change the overall shape, mostly details instead of what each piece is precisely doing.

Implement resources in wasm-tools

Resources have had their initial implementation landed in https://github.com/bytecodealliance/wasm-tools/pull/966 for a number of crates, but not all of them. This implementation will need to be updated depending on how the above spec discussion settles, and the remaining work here is:

Much of this work on wasm-tools is sequentialized and can't be parallelized all that well as each step likely relies on the prior.

Implement resources in Wasmtime

Naturally a big part of resources is the actual runtime impelmentation in Wasmtime! The precise steps involved here are more fuzzy to me than the ones above for wasm-tools, but the rough idea I have at this time is:

Unfortunately I feel like at this point I've sort of gone from "draw a circle" to "finish the owl" and I'm not precisely sure what other intermediate steps there are to implement resources in Wasmtime, despite there obviously being quite a few more steps. One thing I can say though is that the Wasmtime work can, in theory, progress in parallel to the remaining wasm-tools work. Towards the "end" when the bindgen! macro gets involved they'll need to sync back up but it should be possible to implement everything related to resources in Wasmtime independent of WIT and the integration there.


I plan on starting on the wasm-tools based work in the near future and moving outwards from there, but I wanted to be sure to write down my thoughts on all this in the meantime. I can also try to keep this updated over time with more thinking.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 17 2023 at 14:29):

alexcrichton edited issue #6583:

This is intended to be a bit of a tracking issue and/or brain-dump about implementing resources in the component model. The work here spans a number of repositories and isn't exclusively limited to just the Wasmtime repository, but I'm choosing here as probably one of the higher-visibility locations to write all this down.

Settle on a spec

Currently as-is in the component-model repository two resource handles of own and borrow are specified but this may change with recent thinking. Settling on this will be necessary for at least completing this work, but isn't necessarily required before any other work goes forward. This will impact the runtime implementation in Wasmtime but likely won't radically change the overall shape, mostly details instead of what each piece is precisely doing.

Implement resources in wasm-tools

Resources have had their initial implementation landed in https://github.com/bytecodealliance/wasm-tools/pull/966 for a number of crates, but not all of them. This implementation will need to be updated depending on how the above spec discussion settles, and the remaining work here is:

Much of this work on wasm-tools is sequentialized and can't be parallelized all that well as each step likely relies on the prior.

Implement resources in Wasmtime

Naturally a big part of resources is the actual runtime impelmentation in Wasmtime! The precise steps involved here are more fuzzy to me than the ones above for wasm-tools, but the rough idea I have at this time is:

Unfortunately I feel like at this point I've sort of gone from "draw a circle" to "finish the owl" and I'm not precisely sure what other intermediate steps there are to implement resources in Wasmtime, despite there obviously being quite a few more steps. One thing I can say though is that the Wasmtime work can, in theory, progress in parallel to the remaining wasm-tools work. Towards the "end" when the bindgen! macro gets involved they'll need to sync back up but it should be possible to implement everything related to resources in Wasmtime independent of WIT and the integration there.


I plan on starting on the wasm-tools based work in the near future and moving outwards from there, but I wanted to be sure to write down my thoughts on all this in the meantime. I can also try to keep this updated over time with more thinking.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 22 2023 at 00:06):

alexcrichton closed issue #6583:

This is intended to be a bit of a tracking issue and/or brain-dump about implementing resources in the component model. The work here spans a number of repositories and isn't exclusively limited to just the Wasmtime repository, but I'm choosing here as probably one of the higher-visibility locations to write all this down.

Settle on a spec

Currently as-is in the component-model repository two resource handles of own and borrow are specified but this may change with recent thinking. Settling on this will be necessary for at least completing this work, but isn't necessarily required before any other work goes forward. This will impact the runtime implementation in Wasmtime but likely won't radically change the overall shape, mostly details instead of what each piece is precisely doing.

Implement resources in wasm-tools

Resources have had their initial implementation landed in https://github.com/bytecodealliance/wasm-tools/pull/966 for a number of crates, but not all of them. This implementation will need to be updated depending on how the above spec discussion settles, and the remaining work here is:

Much of this work on wasm-tools is sequentialized and can't be parallelized all that well as each step likely relies on the prior.

Implement resources in Wasmtime

Naturally a big part of resources is the actual runtime impelmentation in Wasmtime! The precise steps involved here are more fuzzy to me than the ones above for wasm-tools, but the rough idea I have at this time is:

Unfortunately I feel like at this point I've sort of gone from "draw a circle" to "finish the owl" and I'm not precisely sure what other intermediate steps there are to implement resources in Wasmtime, despite there obviously being quite a few more steps. One thing I can say though is that the Wasmtime work can, in theory, progress in parallel to the remaining wasm-tools work. Towards the "end" when the bindgen! macro gets involved they'll need to sync back up but it should be possible to implement everything related to resources in Wasmtime independent of WIT and the integration there.


I plan on starting on the wasm-tools based work in the near future and moving outwards from there, but I wanted to be sure to write down my thoughts on all this in the meantime. I can also try to keep this updated over time with more thinking.


Last updated: Oct 23 2024 at 20:03 UTC