Skip to content

Commit

Permalink
Add a document on witx.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunfishcode committed Sep 12, 2019
1 parent f75f55f commit 221821f
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
3 changes: 3 additions & 0 deletions design/wasi_unstable/typenames.witx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
;; Type names used by the wasi_unstable module type.
;;
;; Some content here is derived from [CloudABI](https://github.com/NuxiNL/cloudabi).
;;
;; This is a `witx` file. See [here](https://github.com/WebAssembly/WASI/tree/master/docs/witx.md)
;; for an explanation of what that means.

(typename $size_t u32)

Expand Down
3 changes: 3 additions & 0 deletions design/wasi_unstable/wasi_unstable.witx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
;; The wasi_unstable module type.
;;
;; Some content here is derived from [CloudABI](https://github.com/NuxiNL/cloudabi).
;;
;; 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.wid")

Expand Down
30 changes: 30 additions & 0 deletions docs/witx.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Know your `witx`

The `witx` file format is an experimental format which is based on the
[module types] text format (`wit`), (which is in turn based on the
[wat format], which is based on [S-expressions]). It adds some features
using the same syntax as [interface types], some features with syntax
similar to [gc types], as well as a few special features of its own.

`witx` is actively evolving. Expect backwards-incompatible changes,
particularly in the areas where `witx` differs from `wit`.

The initial goal for `witx` is just to have a language suitable for
expressing [WASI] APIs in, to serve as the vocabulary for proposing changes
to existing APIs and proposing new APIs. Initially, while it uses some of
the syntax and concepts from interface types, it doesn't currently imply the
full interface types specification, or the use of the interface types custom
sections.

We expect that eventually we will transition to using the full interface
types specification. Until then, the goals here are to remain aligned with
interface types and other relevant WebAssembly standards and proposals
wherever practical, and to be an input into the design process of interface
types.

[module types]: https://github.com/WebAssembly/module-types/blob/master/proposals/module-types/Overview.md
[interface types]: https://github.com/WebAssembly/interface-types/blob/master/proposals/interface-types/Explainer.md
[gc types]: https://github.com/WebAssembly/gc
[wat format]: https://webassembly.github.io/spec/core/bikeshed/index.html#text-format%E2%91%A0
[S-expressions]: https://en.wikipedia.org/wiki/S-expression
[WASI]: https://github.com/WebAssembly/WASI

0 comments on commit 221821f

Please sign in to comment.