Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new "abi" which supports the full type grammar #422

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
92a4e6e
Start adding support for a "next" ABI
alexcrichton Feb 19, 2021
abc2c9e
Implement reading/writing to/from memory
alexcrichton Feb 23, 2021
5e6c843
Add some tests for read/write memory
alexcrichton Feb 23, 2021
c008c8e
Fill out a bit and fix a few bugs
alexcrichton Feb 23, 2021
c1495cb
Update ABIs with more modes of calling
alexcrichton Feb 25, 2021
0030d39
Automatically infer structs as bitflags/tuple/etc
alexcrichton Feb 25, 2021
fc59732
Support bitflags in the Next ABI
alexcrichton Feb 25, 2021
eefa46c
Support `@witx tag` in the Next ABI
alexcrichton Feb 25, 2021
0881434
Trim to minimize the witx ABI
alexcrichton Feb 25, 2021
a6835be
Don't support export modes with `call` and the preview1 abi
alexcrichton Feb 25, 2021
a5b09ac
Add some initial fuzzing
alexcrichton Feb 25, 2021
9726d02
Add an option shorthand
alexcrichton Feb 26, 2021
439b4f8
Move a helper function to a method on `Type`
alexcrichton Mar 3, 2021
a7fcb5f
Tweak memory ownership in list lifting/lowering
alexcrichton Mar 8, 2021
98a294d
Bump witx to 0.10.0
alexcrichton Mar 8, 2021
2beb50f
Initial support for `in-buffer` and `out-buffer` types
alexcrichton Mar 15, 2021
00d4af8
Merge remote-tracking branch 'origin/main' into abi-next
alexcrichton Apr 2, 2021
59e67ae
Move typename, resource, and const declarations inside of module syntax.
sunfishcode Apr 20, 2021
5651d52
rustfmt
sunfishcode Apr 20, 2021
9013e18
Use the parsed module name where applicable.
sunfishcode May 3, 2021
b53b089
Don't error if the filename "-" doesn't match the module name.
sunfishcode May 4, 2021
d31ad1b
Move `use` syntax inside of modules.
sunfishcode May 4, 2021
85a887b
Say "core wasm" instead of "native wasm".
sunfishcode May 5, 2021
70a8c63
Merge pull request #1 from sunfishcode/abi-next-more
alexcrichton May 25, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
190 changes: 95 additions & 95 deletions phases/ephemeral/docs.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions phases/ephemeral/witx/typenames.witx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
;; This is a `witx` file. See [here](https://github.com/WebAssembly/WASI/tree/master/docs/witx.md)
;; for an explanation of what that means.

(module $typenames

;;; An array size.
;;;
;;; Note: This is similar to `size_t` in POSIX.
Expand Down Expand Up @@ -707,3 +709,5 @@
$prestat_dir
)
)

)
4 changes: 2 additions & 2 deletions phases/ephemeral/witx/wasi_ephemeral_args.witx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
;; This is a `witx` file. See [here](https://github.com/WebAssembly/WASI/tree/master/docs/witx.md)
;; for an explanation of what that means.

(use $errno $size from $typenames)

(module $wasi_ephemeral_args
(use $errno $size from $typenames)

;;; Read command-line argument data.
;;; The size of the array should match that returned by `sizes_get`.
;;; Each argument is expected to be `\0` terminated.
Expand Down
4 changes: 2 additions & 2 deletions phases/ephemeral/witx/wasi_ephemeral_clock.witx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
;; This is a `witx` file. See [here](https://github.com/WebAssembly/WASI/tree/master/docs/witx.md)
;; for an explanation of what that means.

(use $clockid $timestamp $errno from $typenames)

(module $wasi_ephemeral_clock
(use $clockid $timestamp $errno from $typenames)

;;; Return the resolution of a clock.
;;; Implementations are required to provide a non-zero value for supported clocks. For unsupported clocks,
;;; return `errno::inval`.
Expand Down
4 changes: 2 additions & 2 deletions phases/ephemeral/witx/wasi_ephemeral_environ.witx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
;; This is a `witx` file. See [here](https://github.com/WebAssembly/WASI/tree/master/docs/witx.md)
;; for an explanation of what that means.

(use $errno $size from $typenames)

(module $wasi_ephemeral_environ
(use $errno $size from $typenames)

;;; Read environment variable data.
;;; The sizes of the buffers should match that returned by `sizes_get`.
;;; Key/value pairs are expected to be joined with `=`s, and terminated with `\0`s.
Expand Down
4 changes: 2 additions & 2 deletions phases/ephemeral/witx/wasi_ephemeral_fd.witx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
;; This is a `witx` file. See [here](https://github.com/WebAssembly/WASI/tree/master/docs/witx.md)
;; for an explanation of what that means.

(use * from $typenames)

(module $wasi_ephemeral_fd
(use * from $typenames)

;;; Provide file advisory information on a file descriptor.
;;; Note: This is similar to `posix_fadvise` in POSIX.
(@interface func (export "advise")
Expand Down
4 changes: 2 additions & 2 deletions phases/ephemeral/witx/wasi_ephemeral_path.witx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
;; This is a `witx` file. See [here](https://github.com/WebAssembly/WASI/tree/master/docs/witx.md)
;; for an explanation of what that means.

(use * from $typenames)

(module $wasi_ephemeral_path
(use * from $typenames)

;;; Create a directory.
;;; Note: This is similar to `mkdirat` in POSIX.
(@interface func (export "create_directory")
Expand Down
4 changes: 2 additions & 2 deletions phases/ephemeral/witx/wasi_ephemeral_poll.witx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
;; This is a `witx` file. See [here](https://github.com/WebAssembly/WASI/tree/master/docs/witx.md)
;; for an explanation of what that means.

(use $event $subscription $size $errno from $typenames)

(module $wasi_ephemeral_poll
(use $event $subscription $size $errno from $typenames)

;;; Concurrently poll for the occurrence of a set of events.
;;;
;;; If `nsubscriptions` is 0, returns `errno::inval`.
Expand Down
4 changes: 2 additions & 2 deletions phases/ephemeral/witx/wasi_ephemeral_proc.witx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
;; This is a `witx` file. See [here](https://github.com/WebAssembly/WASI/tree/master/docs/witx.md)
;; for an explanation of what that means.

(use $exitcode from $typenames)

(module $wasi_ephemeral_proc
(use $exitcode from $typenames)

;;; Terminate the process normally. An exit code of `$exitcode::success`
;;; reports successful completion of the program. An exit code of
;;; `$exitcode::failure` or any other value less than 126 reports a
Expand Down
4 changes: 2 additions & 2 deletions phases/ephemeral/witx/wasi_ephemeral_random.witx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
;; This is a `witx` file. See [here](https://github.com/WebAssembly/WASI/tree/master/docs/witx.md)
;; for an explanation of what that means.

(use $errno $size from $typenames)

(module $wasi_ephemeral_random
(use $errno $size from $typenames)

;;; Write high-quality random data into a buffer.
;;; This function blocks when the implementation is unable to immediately
;;; provide sufficient high-quality random data.
Expand Down
4 changes: 2 additions & 2 deletions phases/ephemeral/witx/wasi_ephemeral_sched.witx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
;; This is a `witx` file. See [here](https://github.com/WebAssembly/WASI/tree/master/docs/witx.md)
;; for an explanation of what that means.

(use $errno from $typenames)

(module $wasi_ephemeral_sched
(use $errno from $typenames)

;;; Temporarily yield execution of the calling thread.
;;; Note: This is similar to `yield` in POSIX.
(@interface func (export "yield")
Expand Down
4 changes: 2 additions & 2 deletions phases/ephemeral/witx/wasi_ephemeral_sock.witx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
;; This is a `witx` file. See [here](https://github.com/WebAssembly/WASI/tree/master/docs/witx.md)
;; for an explanation of what that means.

(use * from $typenames)

(module $wasi_ephemeral_sock
(use * from $typenames)

;;; Receive a message from a socket.
;;; Note: This is similar to `recv` in POSIX, though it also supports reading
;;; the data into multiple buffers in the manner of `readv`.
Expand Down
Loading