Skip to content

Implement a new use syntax #415

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

Merged
merged 1 commit into from
Mar 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1,080 changes: 527 additions & 553 deletions phases/ephemeral/docs.md

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions phases/ephemeral/witx/wasi_ephemeral_args.witx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +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 "typenames.witx")
(use $errno $size from $typenames)

(module $wasi_ephemeral_args
;;; Linear memory to be accessed by WASI functions that need it.
(import "memory" (memory))

;;; 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
5 changes: 1 addition & 4 deletions phases/ephemeral/witx/wasi_ephemeral_clock.witx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +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 "typenames.witx")
(use $clockid $timestamp $errno from $typenames)

(module $wasi_ephemeral_clock
;;; Linear memory to be accessed by WASI functions that need it.
(import "memory" (memory))

;;; 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
5 changes: 1 addition & 4 deletions phases/ephemeral/witx/wasi_ephemeral_environ.witx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +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 "typenames.witx")
(use $errno $size from $typenames)

(module $wasi_ephemeral_environ
;;; Linear memory to be accessed by WASI functions that need it.
(import "memory" (memory))

;;; 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
5 changes: 1 addition & 4 deletions phases/ephemeral/witx/wasi_ephemeral_fd.witx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +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 "typenames.witx")
(use * from $typenames)

(module $wasi_ephemeral_fd
;;; Linear memory to be accessed by WASI functions that need it.
(import "memory" (memory))

;;; Provide file advisory information on a file descriptor.
;;; Note: This is similar to `posix_fadvise` in POSIX.
(@interface func (export "advise")
Expand Down
5 changes: 1 addition & 4 deletions phases/ephemeral/witx/wasi_ephemeral_path.witx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +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 "typenames.witx")
(use * from $typenames)

(module $wasi_ephemeral_path
;;; Linear memory to be accessed by WASI functions that need it.
(import "memory" (memory))

;;; Create a directory.
;;; Note: This is similar to `mkdirat` in POSIX.
(@interface func (export "create_directory")
Expand Down
5 changes: 1 addition & 4 deletions phases/ephemeral/witx/wasi_ephemeral_poll.witx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +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 "typenames.witx")
(use $event $subscription $size $errno from $typenames)

(module $wasi_ephemeral_poll
;;; Linear memory to be accessed by WASI functions that need it.
(import "memory" (memory))

;;; Concurrently poll for the occurrence of a set of events.
;;;
;;; If `nsubscriptions` is 0, returns `errno::inval`.
Expand Down
2 changes: 1 addition & 1 deletion phases/ephemeral/witx/wasi_ephemeral_proc.witx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
;; 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 "typenames.witx")
(use $exitcode from $typenames)

(module $wasi_ephemeral_proc
;;; Terminate the process normally. An exit code of `$exitcode::success`
Expand Down
5 changes: 1 addition & 4 deletions phases/ephemeral/witx/wasi_ephemeral_random.witx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +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 "typenames.witx")
(use $errno $size from $typenames)

(module $wasi_ephemeral_random
;;; Linear memory to be accessed by WASI functions that need it.
(import "memory" (memory))

;;; 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
2 changes: 1 addition & 1 deletion phases/ephemeral/witx/wasi_ephemeral_sched.witx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
;; 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 "typenames.witx")
(use $errno from $typenames)

(module $wasi_ephemeral_sched
;;; Temporarily yield execution of the calling thread.
Expand Down
5 changes: 1 addition & 4 deletions phases/ephemeral/witx/wasi_ephemeral_sock.witx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +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 "typenames.witx")
(use * from $typenames)

(module $wasi_ephemeral_sock
;;; Linear memory to be accessed by WASI functions that need it.
(import "memory" (memory))

;;; 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