Skip to content

Rewrite wasmtime-wasi to use wasi-common, and introduce wastime-wasi-c#170

Merged
sunfishcode merged 6 commits intomasterfrom
wasi-common
Jun 3, 2019
Merged

Rewrite wasmtime-wasi to use wasi-common, and introduce wastime-wasi-c#170
sunfishcode merged 6 commits intomasterfrom
wasi-common

Conversation

@kubkon
Copy link
Member

@kubkon kubkon commented Jun 3, 2019

This PR introduces two major changes:

  1. it slims wasmtime-wasi to the required bare minimum to glue wasmtime runtime with wasi-common; this will be the default some time in the future with WASI implementation being purely in Rust, supporting all 3 major platforms (Linux, Mac and Windows)
  2. it preserves the C WASI implementation as a wasmtime-wasi-c crate for backwards compatibility and reference (this is currently the default WASI implementation used by wasmtime)

With this PR landing, you can now opt-in to use wasmtime-wasi by setting --wasi-common option at runtime:

$ wasmtime --wasi-common ...

Also, please note that wasmtime-wasi-c is only available on *nix platforms. So, if you are experimenting with WASI on Windows, you have to specify the --wasi-common flag.

kubkon and others added 6 commits June 3, 2019 21:37
@kubkon kubkon requested a review from sunfishcode June 3, 2019 19:51
Copy link
Member

@sunfishcode sunfishcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

One additional thing I just thought of here is that we could move preopen_dir into wasi_common, which would keep API issues like FILE_FLAG_BACKUP_SEMANTICS encapsulated inside the wasi_common crate. Do you think that makes sense?

@sunfishcode sunfishcode merged commit e530a58 into master Jun 3, 2019
@kubkon
Copy link
Member Author

kubkon commented Jun 3, 2019

Looks good.

One additional thing I just thought of here is that we could move preopen_dir into wasi_common, which would keep API issues like FILE_FLAG_BACKUP_SEMANTICS encapsulated inside the wasi_common crate. Do you think that makes sense?

Excellent idea! I'll add it to my todo list :-)

@kubkon kubkon deleted the wasi-common branch June 3, 2019 20:32
dhil added a commit to dhil/wasmtime that referenced this pull request May 14, 2024
avanhatt pushed a commit to wellesley-prog-sys/wasmtime that referenced this pull request Oct 23, 2024
Attach positional information to spec expressions.

This is the first stage in the positional information plumbing required
to support more helpful error messages.

Updates bytecodealliance#169
avanhatt pushed a commit to wellesley-prog-sys/wasmtime that referenced this pull request Oct 23, 2024
Attach positional information to spec expressions.

This is the first stage in the positional information plumbing required
to support more helpful error messages.

Updates bytecodealliance#169
dicej pushed a commit to dicej/wasmtime that referenced this pull request May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants