Stream: git-wasmtime

Topic: wasmtime / PR #2444 Remove duplication in wasi-common for...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 23 2020 at 17:19):

alexcrichton opened PR #2444 from rm-wig to main:

This commit deletes the old snapshot_0 implementation of wasi-common,
along with the wig crate that was used to generate bindings for it.
This then reimplements snapshot_0 in terms of
wasi_snapshot_preview1. There were very few changes between the two
snapshots:

This makes all of the syscalls relatively straightforward to simply
delegate to the next snapshot's implementation. Some trickery happens to
avoid extra cost when dealing with iovecs, but since the memory layout
of iovecs remained the same this should still work.

Now that snapshot_0 is using wiggle we simply have a trait to
implement, and that's implemented for the same WasiCtx that has the
wasi_snapshot_preview1 trait implemented for it as well. While this
theoretically means that you could share the file descriptor table
between the two snapshots that's not supported in the generated bindings
just yet. A separate WasiCtx will be created for each WASI module.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 23 2020 at 17:36):

alexcrichton updated PR #2444 from rm-wig to main:

This commit deletes the old snapshot_0 implementation of wasi-common,
along with the wig crate that was used to generate bindings for it.
This then reimplements snapshot_0 in terms of
wasi_snapshot_preview1. There were very few changes between the two
snapshots:

This makes all of the syscalls relatively straightforward to simply
delegate to the next snapshot's implementation. Some trickery happens to
avoid extra cost when dealing with iovecs, but since the memory layout
of iovecs remained the same this should still work.

Now that snapshot_0 is using wiggle we simply have a trait to
implement, and that's implemented for the same WasiCtx that has the
wasi_snapshot_preview1 trait implemented for it as well. While this
theoretically means that you could share the file descriptor table
between the two snapshots that's not supported in the generated bindings
just yet. A separate WasiCtx will be created for each WASI module.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 23 2020 at 17:36):

alexcrichton updated PR #2444 from rm-wig to main:

This commit deletes the old snapshot_0 implementation of wasi-common,
along with the wig crate that was used to generate bindings for it.
This then reimplements snapshot_0 in terms of
wasi_snapshot_preview1. There were very few changes between the two
snapshots:

This makes all of the syscalls relatively straightforward to simply
delegate to the next snapshot's implementation. Some trickery happens to
avoid extra cost when dealing with iovecs, but since the memory layout
of iovecs remained the same this should still work.

Now that snapshot_0 is using wiggle we simply have a trait to
implement, and that's implemented for the same WasiCtx that has the
wasi_snapshot_preview1 trait implemented for it as well. While this
theoretically means that you could share the file descriptor table
between the two snapshots that's not supported in the generated bindings
just yet. A separate WasiCtx will be created for each WASI module.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 23 2020 at 18:10):

alexcrichton updated PR #2444 from rm-wig to main:

This commit deletes the old snapshot_0 implementation of wasi-common,
along with the wig crate that was used to generate bindings for it.
This then reimplements snapshot_0 in terms of
wasi_snapshot_preview1. There were very few changes between the two
snapshots:

This makes all of the syscalls relatively straightforward to simply
delegate to the next snapshot's implementation. Some trickery happens to
avoid extra cost when dealing with iovecs, but since the memory layout
of iovecs remained the same this should still work.

Now that snapshot_0 is using wiggle we simply have a trait to
implement, and that's implemented for the same WasiCtx that has the
wasi_snapshot_preview1 trait implemented for it as well. While this
theoretically means that you could share the file descriptor table
between the two snapshots that's not supported in the generated bindings
just yet. A separate WasiCtx will be created for each WASI module.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 24 2020 at 20:09):

alexcrichton updated PR #2444 from rm-wig to main:

This commit deletes the old snapshot_0 implementation of wasi-common,
along with the wig crate that was used to generate bindings for it.
This then reimplements snapshot_0 in terms of
wasi_snapshot_preview1. There were very few changes between the two
snapshots:

This makes all of the syscalls relatively straightforward to simply
delegate to the next snapshot's implementation. Some trickery happens to
avoid extra cost when dealing with iovecs, but since the memory layout
of iovecs remained the same this should still work.

Now that snapshot_0 is using wiggle we simply have a trait to
implement, and that's implemented for the same WasiCtx that has the
wasi_snapshot_preview1 trait implemented for it as well. While this
theoretically means that you could share the file descriptor table
between the two snapshots that's not supported in the generated bindings
just yet. A separate WasiCtx will be created for each WASI module.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 25 2020 at 17:06):

alexcrichton updated PR #2444 from rm-wig to main:

This commit deletes the old snapshot_0 implementation of wasi-common,
along with the wig crate that was used to generate bindings for it.
This then reimplements snapshot_0 in terms of
wasi_snapshot_preview1. There were very few changes between the two
snapshots:

This makes all of the syscalls relatively straightforward to simply
delegate to the next snapshot's implementation. Some trickery happens to
avoid extra cost when dealing with iovecs, but since the memory layout
of iovecs remained the same this should still work.

Now that snapshot_0 is using wiggle we simply have a trait to
implement, and that's implemented for the same WasiCtx that has the
wasi_snapshot_preview1 trait implemented for it as well. While this
theoretically means that you could share the file descriptor table
between the two snapshots that's not supported in the generated bindings
just yet. A separate WasiCtx will be created for each WASI module.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 17:56):

pchickey submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 30 2020 at 18:27):

alexcrichton merged PR #2444.


Last updated: Nov 22 2024 at 16:03 UTC