From 9dfd9d5a31834dd6bbbda06b9e1412db1c9d0d18 Mon Sep 17 00:00:00 2001 From: ayakoakasaka <98828539+ayakoakasaka@users.noreply.github.com> Date: Wed, 29 Nov 2023 15:05:07 +0100 Subject: [PATCH] Initial commit --- .github/workflows/main.yml | 14 ++++ LICENSE.md | 8 ++ README.md | 112 +++++++++++++++++++++++++++ imports.md | 72 +++++++++++++++++ test/README.md | 11 +++ wit/deps/example-dep/example-api.wit | 8 ++ wit/example.wit | 59 ++++++++++++++ wit/world.wit | 12 +++ 8 files changed, 296 insertions(+) create mode 100644 .github/workflows/main.yml create mode 100644 LICENSE.md create mode 100644 README.md create mode 100644 imports.md create mode 100644 test/README.md create mode 100644 wit/deps/example-dep/example-api.wit create mode 100644 wit/example.wit create mode 100644 wit/world.wit diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..e210671 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,14 @@ +name: CI +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + abi-up-to-date: + name: Check ABI files are up-to-date + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: WebAssembly/wit-abi-up-to-date@v15 diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..4753095 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,8 @@ +Copyright © 2019-2023 the Contributors to the WASI Specification, published +by the [WebAssembly Community Group][cg] under the +[W3C Community Contributor License Agreement (CLA)][cla]. A human-readable +[summary][summary] is available. + +[cg]: https://www.w3.org/community/webassembly/ +[cla]: https://www.w3.org/community/about/agreements/cla/ +[summary]: https://www.w3.org/community/about/agreements/cla-deed/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..733036b --- /dev/null +++ b/README.md @@ -0,0 +1,112 @@ +# [Example WASI proposal] + +This template can be used to start a new proposal, which can then be proposed in the WASI Subgroup meetings. + +The sections below are recommended. However, every proposal is different, and the community can help you flesh out the proposal, so don't block on having something filled in for each one of them. + +Thank you to the W3C Privacy CG for the [inspiration](https://github.com/privacycg/template)! + +# [Title] + +A proposed [WebAssembly System Interface](https://github.com/WebAssembly/WASI) API. + +### Current Phase + +[Fill in the current phase, e.g. Phase 1] + +### Champions + +- [Champion 1] +- [Champion 2] +- [etc.] + +### Phase 4 Advancement Criteria + +TODO before entering Phase 2. + +## Table of Contents [if the explainer is longer than one printed page] + +- [Introduction](#introduction) +- [Goals [or Motivating Use Cases, or Scenarios]](#goals-or-motivating-use-cases-or-scenarios) +- [Non-goals](#non-goals) +- [API walk-through](#api-walk-through) + - [Use case 1](#use-case-1) + - [Use case 2](#use-case-2) +- [Detailed design discussion](#detailed-design-discussion) + - [[Tricky design choice 1]](#tricky-design-choice-1) + - [[Tricky design choice 2]](#tricky-design-choice-2) +- [Considered alternatives](#considered-alternatives) + - [[Alternative 1]](#alternative-1) + - [[Alternative 2]](#alternative-2) +- [Stakeholder Interest & Feedback](#stakeholder-interest--feedback) +- [References & acknowledgements](#references--acknowledgements) + +### Introduction + +[The "executive summary" or "abstract". Explain in a few sentences what the goals of the project are, and a brief overview of how the solution works. This should be no more than 1-2 paragraphs.] + +### Goals [or Motivating Use Cases, or Scenarios] + +[What is the end-user need which this project aims to address?] + +### Non-goals + +[If there are "adjacent" goals which may appear to be in scope but aren't, enumerate them here. This section may be fleshed out as your design progresses and you encounter necessary technical and other trade-offs.] + +### API walk-through + +The full API documentation can be found [here](wasi-proposal-template.md). + +[Walk through of how someone would use this API.] + +#### [Use case 1] + +[Provide example code snippets and diagrams explaining how the API would be used to solve the given problem] + +#### [Use case 2] + +[etc.] + +### Detailed design discussion + +[This section should mostly refer to the .wit.md file that specifies the API. This section is for any discussion of the choices made in the API which don't make sense to document in the spec file itself.] + +#### [Tricky design choice #1] + +[Talk through the tradeoffs in coming to the specific design point you want to make.] + +``` +// Illustrated with example code. +``` + +[This may be an open question, in which case you should link to any active discussion threads.] + +#### [Tricky design choice 2] + +[etc.] + +### Considered alternatives + +[This section is not required if you already covered considered alternatives in the design discussion above.] + +#### [Alternative 1] + +[Describe an alternative which was considered, and why you decided against it.] + +#### [Alternative 2] + +[etc.] + +### Stakeholder Interest & Feedback + +TODO before entering Phase 3. + +[This should include a list of implementers who have expressed interest in implementing the proposal] + +### References & acknowledgements + +Many thanks for valuable feedback and advice from: + +- [Person 1] +- [Person 2] +- [etc.] diff --git a/imports.md b/imports.md new file mode 100644 index 0000000..8c60710 --- /dev/null +++ b/imports.md @@ -0,0 +1,72 @@ +
wasi:example-api-package/example-dep-interface
wasi:example-package/example-interface
type example-dep-type
u32
+## Import interface wasi:example-package/example-interface +
Short interface description.
+Explanation for developers using the interface API. It should include an
+overview of the API as a whole as well as call out notable items in it,
+for example example-api-type
and example-api-function
.
type example-dep-type
+#### `record example-api-type` +
Short type description
+Explanation for developers using this type. It may be useful to give
+some examples of places in the API where the type is used, such as in
+the arguments and return type of example-api-function
.
example-api-function: func
Short function description
+Explanation for developers using the API. This should describe the
+arguments which in this function are arg0
, arg1
, and arg2
, and the
+return value.
arg0
: example-api-type
arg1
: string
arg2
: example-dep-type
example-api-type
>