Skip to content

Commit 292306a

Browse files
committed
Adding pre-build to main
Signed-off-by: Eric Gregory <eric@cosmonic.com>
0 parents  commit 292306a

19 files changed

Lines changed: 15152 additions & 0 deletions

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# WASI.dev
2+
3+
WASI.dev is an introduction to [WASI](https://github.com/WebAssembly/WASI/tree/main) for users of all backgrounds. The site is under active development by volunteers coordinated through the Bytecode Alliance's Special Interest Group for Documentation. If you're interested in getting involved, you can find us on the SIG Documentation channel of the [Bytecode Alliance's Zulip server](https://bytecodealliance.zulipchat.com/), or [contribute on the WASI.dev GitHub repo](https://github.com/bytecodealliance/wasi.dev).
4+
5+
### Local development
6+
7+
This website is built using [Docusaurus](https://docusaurus.io/). After forking and checking out the `main` branch of this repository, you can build and start a development server with `npm install` and `npm start`. Most changes are reflected live without having to restart the server. Run `npm run build` to produce the site content, and open a PR to the `gh-pages` branch of the `bytecodealliance/wasi.dev` repo to contribute.
8+
9+

babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};

docs/contribute.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: "Contribute"
3+
sidebar_position: 4
4+
---
5+
6+
This site is a community effort supported by volunteers through the Bytecode Alliance's Special Interest Group for Documentation.
7+
The **[Bytecode Alliance](https://bytecodealliance.org/)** is a community comprised of many individual contributors and 30+ companies involved in the WebAssembly space.
8+
9+
The Bytecode Alliance is focused on creating a shared implementation of standards produced by the WebAssembly CG, the WASI Subgroup, and other standardization bodies. We believe that standards are best informed by implementation. To enable this, we bring together a wide range of different use cases. Many of our contributors are also active in standardization and use this implementation experience and feedback to inform their work.
10+
11+
If you would like to get involved, you can find us on the SIG Documentation channel of the [Bytecode Alliance's Zulip server](https://bytecodealliance.zulipchat.com/) or [contribute on the WASI.dev GitHub repo](https://github.com/bytecodealliance/wasi.dev).

docs/interfaces.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: "Interfaces"
3+
sidebar_position: 2
4+
---
5+
6+
## Modules and components
7+
8+
WebAssembly binaries may be **components** built according to the [Component Model](https://component-model.bytecodealliance.org/) or **modules** built to the core WebAssembly specification.
9+
10+
As you begin writing a Wasm application using WASI APIs, one of your first decisions will be which type of binary you want to produce&mdash;a decision typically guided by your use-case and the runtime you wish to use. Check to see which WASI releases your runtime supports.
11+
12+
* **Components** can use WASI 0.2 and the Component Model for composability and interoperability, meaning that a WebAssembly component compiled from one language (Rust, for example) can communicate or be combined with a component compiled from another language (such as Go). WASI 0.2 sets the stage for the future of WASI.
13+
14+
* **Modules** can use APIs from WASI 0.1, an earlier stage of WASI's development. Since WASI 0.2 was released in February 2024, WASI 0.1 support is more widespread among Wasm runtimes, and it is widely used in production today.
15+
16+
## WASI 0.2
17+
18+
WASI 0.2 is the most recent WASI release. APIs designed for WASI 0.2 and the Component Model are defined with the [**WebAssembly Interface Type (WIT)**](https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md) Interface Description Language (IDL). WIT API definitions are made in `.wit` files which are composed into Wasm component binaries. The following interfaces are included in WASI P2:
19+
20+
| API | Repository | Version |
21+
| ------------ | ---------------------------------------------- | ------- |
22+
| I/O | https://github.com/WebAssembly/wasi-io | 0.2.0 |
23+
| Clocks | https://github.com/WebAssembly/wasi-clocks | 0.2.0 |
24+
| Random | https://github.com/WebAssembly/wasi-random | 0.2.0 |
25+
| Filesystem | https://github.com/WebAssembly/wasi-filesystem | 0.2.0 |
26+
| Sockets | https://github.com/WebAssembly/wasi-sockets | 0.2.0 |
27+
| CLI | https://github.com/WebAssembly/wasi-cli | 0.2.0 |
28+
| HTTP | https://github.com/WebAssembly/wasi-http | 0.2.0 |
29+
30+
You can explore the types and definitions for a given WASI 0.2 API in its WIT files. When you're ready to start using the API, you will typically generate bindings between the WIT definitions and the language you will be compiling to Wasm. For more information on WIT, see the [WIT section of the Component Model documentation](https://component-model.bytecodealliance.org/design/wit.html).
31+
32+
## WASI 0.1
33+
34+
WASI P1 APIs were defined with WITX Interface Description Language (IDL), which was an iterative step toward WIT but bears notable differences, including that it was developed as a lower-level derivation of WebAssembly Text Format (a human-readable source format for Wasm modules). Documentation for WASI 0.1 and WITX can be found in the [`legacy` directory of the WASI GitHub repository](https://github.com/WebAssembly/WASI/blob/main/legacy/README.md), along with a [complete list of 0.1 types and modules](https://github.com/WebAssembly/WASI/blob/main/legacy/preview1/docs.md).
35+
36+
## Proposals for the standard
37+
38+
All WASI APIs are **proposals** for standardization by the WASI Subgroup. The API proposals in WASI 0.1 and 0.2 met implementation and portability criteria for inclusion at the time of those releases.
39+
40+
All active WASI API proposals can be found on the [WASI GitHub repository](https://github.com/WebAssembly/WASI/blob/main/Proposals.md), along with the [process for making a proposal](https://github.com/WebAssembly/WASI/blob/main/Contributing.md#the-phase-process).

docs/introduction.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: "Introduction"
3+
slug: /
4+
sidebar_position: 1
5+
---
6+
7+
The **WebAssembly System Interface (WASI)** is a group of standard API specifications for software compiled to the **[W3C WebAssembly (Wasm) standard](https://www.w3.org/TR/wasm-core-2/)**. WASI is designed to provide a secure standard interface for applications that can be compiled to Wasm from any language, and that may run anywhere&mdash;from browsers to clouds to embedded devices.
8+
9+
By standardizing APIs for WebAssembly, WASI provides a way to compose software written in different languages&mdash;without costly and clunky interface systems like HTTP-based microservices. We believe that every project with a plugin model should be using WASI, and that WASI is ideally suited for projects with SDKs for multiple languages, e.g. client libraries.
10+
11+
To date, WASI has seen two milestone releases known as **0.1** and **0.2**. (Sometimes you will see these referred to as Preview 1 and Preview 2, or P1 and P2). The concepts and vocabulary of Wasm and WASI can sometimes be opaque to newcomers, so WASI.dev serves as an introduction to WASI for users of all backgrounds. It's very much a work-in-progress, and we welcome contributions on the [GitHub repo](https://github.com/bytecodealliance/wasi.dev).
12+
13+
## Who are we?
14+
15+
WASI is an open standard under active development by the [**WASI Subgroup**](https://github.com/WebAssembly/WASI/blob/main/Charter.md) in the **W3C WebAssembly Community Group**. Discussions happen in [GitHub issues](https://github.com/WebAssembly/WASI/issues), [pull requests](https://github.com/WebAssembly/WASI/pulls), and [bi-weekly Zoom meetings](https://github.com/WebAssembly/meetings/tree/main/wasi).
16+
17+
## Who are you?
18+
19+
WASI and Wasm are tools for any type of software developer: whether you're writing web apps, plugins, serverless functions, User-Defined Functions (UDFs) in a database, embedded controller components, sidecar networking filters, or something completely different. This site is intended to make WASI understandable regardless of your background, use-case, or familiarity with the WebAssembly ecosystem.
20+
21+
## How to get started
22+
23+
There are many different runtimes that support WASI including [Wasmtime](https://wasmtime.dev/), [WAMR](https://bytecodealliance.github.io/wamr.dev/), [WasmEdge](https://wasmedge.org/), [wazero](https://wazero.io/), [Wasmer](https://wasmer.io/), [wasmi](https://github.com/wasmi-labs/wasmi), and [wasm3](https://github.com/wasm3/wasm3). Many of these runtimes have different areas of focus (i.e., IoT, embedded devices, and edge for WAMR, or server-side and non-web embeddings with components for Wasmtime). The introductory documentation for each is a great place to start.
24+
25+
WASI can be implemented by both core Wasm modules and applications built according to the **Component Model**, a specification for Wasm applications that are interoperable and composable. You can learn more about components in the Bytecode Alliance's **[WebAssembly Component Model](https://component-model.bytecodealliance.org/)** documentation.
26+
27+
[Continue reading](./interfaces.md) to learn more about WASI interfaces, including available APIs and how they are defined.
28+
29+

docs/resources.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: "Resources"
3+
sidebar_position: 3
4+
---
5+
6+
The following resources are helpful for those wishing to learn more about WASI and the WebAssembly ecosystem:
7+
8+
## WASI
9+
10+
* **[The WASI GitHub repository](https://github.com/WebAssembly/WASI)**
11+
12+
## WASI 0.2 and the Component Model
13+
14+
* **[WASI 0.2 GitHub repository](https://github.com/WebAssembly/WASI/blob/main/preview2/README.md)**
15+
* **[The Component Model GitHub repository](https://github.com/WebAssembly/component-model/tree/main)**
16+
* **[The WebAssembly Component Model documentation](https://component-model.bytecodealliance.org/)**
17+
* **[The WIT format](https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md)**
18+
19+
## WASI 0.1
20+
21+
* **[WASI 0.1 legacy documentation](https://github.com/WebAssembly/WASI/blob/main/legacy/README.md)**
22+
* **[WASI 0.1 types and modules](https://github.com/WebAssembly/WASI/blob/main/legacy/preview1/docs.md)**
23+
24+
## WebAssembly
25+
26+
* **[The WebAssembly Core Specification](https://www.w3.org/TR/wasm-core-2/)**
27+
* **[WebAssembly Text (WAT) format](https://webassembly.github.io/spec/core/text/index.html)**

docusaurus.config.js

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
// @ts-check
2+
// `@type` JSDoc annotations allow editor autocompletion and type checking
3+
// (when paired with `@ts-check`).
4+
// There are various equivalent ways to declare your Docusaurus config.
5+
// See: https://docusaurus.io/docs/api/docusaurus-config
6+
7+
import {themes as prismThemes} from 'prism-react-renderer';
8+
9+
/** @type {import('@docusaurus/types').Config} */
10+
const config = {
11+
title: 'WASI.dev',
12+
favicon: 'img/favicon.ico',
13+
14+
// Set the production url of your site here
15+
url: 'https://bytecodealliance.github.io',
16+
// Set the /<baseUrl>/ pathname under which your site is served
17+
// For GitHub pages deployment, it is often '/<projectName>/'
18+
baseUrl: '/wasi.dev/',
19+
20+
// GitHub pages deployment config.
21+
// If you aren't using GitHub pages, you don't need these.
22+
organizationName: 'bytecodealliance', // Usually your GitHub org/user name.
23+
projectName: 'wasi.dev', // Usually your repo name.
24+
trailingSlash: false,
25+
26+
onBrokenLinks: 'throw',
27+
onBrokenMarkdownLinks: 'warn',
28+
29+
// Even if you don't use internationalization, you can use this field to set
30+
// useful metadata like html lang. For example, if your site is Chinese, you
31+
// may want to replace "en" with "zh-Hans".
32+
i18n: {
33+
defaultLocale: 'en',
34+
locales: ['en'],
35+
},
36+
37+
presets: [
38+
[
39+
'classic',
40+
/** @type {import('@docusaurus/preset-classic').Options} */
41+
({
42+
docs: {
43+
routeBasePath: '/', // Set this value to '/'.
44+
45+
sidebarPath: './sidebars.js',
46+
// Please change this to your repo.
47+
// Remove this to remove the "edit this page" links.
48+
editUrl:
49+
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
50+
},
51+
blog: false,
52+
theme: {
53+
customCss: './src/css/custom.css',
54+
},
55+
}),
56+
],
57+
],
58+
59+
themeConfig:
60+
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
61+
({
62+
// Replace with your project's social card
63+
image: 'img/docusaurus-social-card.jpg',
64+
navbar: {
65+
title: 'WASI.dev',
66+
logo: {
67+
alt: 'WASI logo',
68+
src: 'img/wasi.png',
69+
},
70+
items: [
71+
{
72+
href: 'https://github.com/bytecodealliance/wasi.dev',
73+
label: 'GitHub',
74+
position: 'right',
75+
},
76+
],
77+
},
78+
footer: {
79+
style: 'dark',
80+
links: [
81+
{
82+
title: 'Docs',
83+
items: [
84+
{
85+
label: 'Introduction',
86+
to: '/docs/intro',
87+
},
88+
],
89+
},
90+
{
91+
title: 'Community',
92+
items: [
93+
{
94+
label: 'Zulip',
95+
href: 'https://bytecodealliance.zulipchat.com/',
96+
},
97+
],
98+
},
99+
{
100+
title: 'More',
101+
items: [
102+
{
103+
label: 'GitHub',
104+
href: 'https://github.com/bytecodealliance/wasi.dev',
105+
},
106+
],
107+
},
108+
],
109+
},
110+
prism: {
111+
theme: prismThemes.github,
112+
darkTheme: prismThemes.dracula,
113+
},
114+
}),
115+
};
116+
117+
export default config;

0 commit comments

Comments
 (0)