├── docs
├── static
│ ├── .nojekyll
│ ├── img
│ │ ├── docs
│ │ │ └── features
│ │ │ │ └── wasi-nn.webp
│ │ └── languages
│ │ │ ├── zig.svg
│ │ │ └── js.svg
│ └── _redirects
├── babel.config.js
├── docs
│ ├── features
│ │ └── _category_.json
│ ├── get-started
│ │ └── _category_.json
│ ├── languages
│ │ └── _category_.json
│ └── containers.md
├── src
│ ├── components
│ │ └── HomepageFeatures
│ │ │ └── styles.module.css
│ └── pages
│ │ └── index.module.css
├── .gitignore
├── README.md
├── sidebars.js
└── package.json
├── tests
└── data
│ ├── public
│ ├── .keep
│ ├── index.html
│ ├── main.css
│ └── about
│ │ └── index.html
│ ├── params
│ ├── [id].wasm
│ ├── fixed.wasm
│ ├── [id]
│ │ ├── fixed.wasm
│ │ └── sub.wasm
│ └── sub
│ │ ├── [...all].wasm
│ │ ├── [id].wasm
│ │ └── sub
│ │ └── [...all].wasm
│ └── metadata
│ ├── runtime.toml
│ └── repository.toml
├── crates
├── panel
│ ├── client
│ │ ├── dist
│ │ │ └── .gitkeep
│ │ ├── public
│ │ │ └── .gitkeep
│ │ ├── .gitignore
│ │ ├── src
│ │ │ ├── components
│ │ │ │ ├── content.scss
│ │ │ │ ├── header.scss
│ │ │ │ ├── content.jsx
│ │ │ │ ├── header.jsx
│ │ │ │ ├── sidebar.scss
│ │ │ │ ├── sidebar.jsx
│ │ │ │ └── workerCard.jsx
│ │ │ ├── main.jsx
│ │ │ ├── main.scss
│ │ │ ├── app.jsx
│ │ │ ├── routes
│ │ │ │ └── workers.jsx
│ │ │ └── router.jsx
│ │ ├── index.html
│ │ ├── vite.config.js
│ │ └── package.json
│ ├── src
│ │ ├── handlers
│ │ │ ├── mod.rs
│ │ │ └── panel.rs
│ │ └── lib.rs
│ ├── Cargo.toml
│ └── build.rs
├── project
│ ├── tests
│ │ └── data
│ │ │ └── index.js
│ ├── src
│ │ ├── types
│ │ │ └── mod.rs
│ │ ├── options.rs
│ │ └── fetch.rs
│ ├── README.md
│ └── Cargo.toml
├── router
│ ├── tests
│ │ └── data
│ │ │ └── files
│ │ │ ├── _home.ext
│ │ │ ├── _index.js
│ │ │ ├── examples.js
│ │ │ ├── home.ext
│ │ │ ├── index.js
│ │ │ ├── public.js
│ │ │ ├── examples
│ │ │ ├── home.ext
│ │ │ ├── public.js
│ │ │ ├── _index
│ │ │ │ ├── home.ext
│ │ │ │ └── index.js
│ │ │ └── index
│ │ │ │ ├── home.ext
│ │ │ │ ├── index.js
│ │ │ │ └── public
│ │ │ │ └── index.js
│ │ │ ├── public
│ │ │ ├── home.ext
│ │ │ └── index.js
│ │ │ └── _internal
│ │ │ └── index.js
│ └── Cargo.toml
├── api-manage
│ ├── src
│ │ ├── handlers
│ │ │ ├── mod.rs
│ │ │ └── v0
│ │ │ │ └── mod.rs
│ │ ├── models
│ │ │ ├── mod.rs
│ │ │ └── worker.rs
│ │ └── lib.rs
│ └── Cargo.toml
├── worker
│ ├── src
│ │ ├── bindings
│ │ │ └── mod.rs
│ │ └── features
│ │ │ ├── mod.rs
│ │ │ ├── data.rs
│ │ │ ├── http_requests.rs
│ │ │ └── folders.rs
│ └── Cargo.toml
├── server
│ ├── src
│ │ ├── handlers
│ │ │ ├── mod.rs
│ │ │ └── not_found.rs
│ │ └── errors.rs
│ └── Cargo.toml
├── runtimes
│ ├── src
│ │ ├── modules
│ │ │ ├── mod.rs
│ │ │ └── native.rs
│ │ ├── errors.rs
│ │ └── runtime.rs
│ └── Cargo.toml
├── api-manage-openapi
│ ├── src
│ │ └── lib.rs
│ ├── Cargo.toml
│ └── build.rs
├── store
│ └── Cargo.toml
├── data-kv
│ ├── Cargo.toml
│ └── src
│ │ └── store.rs
└── config
│ ├── Cargo.toml
│ └── src
│ └── errors.rs
├── examples
├── protomaps
│ ├── _maps
│ │ ├── .keep
│ │ └── map.pmtiles
│ ├── _libs
│ │ └── __init__.py
│ ├── .gitignore
│ ├── [z]
│ │ └── [x]
│ │ │ └── [y]
│ │ │ ├── index.toml
│ │ │ └── index.py
│ ├── Dockerfile
│ ├── Makefile
│ ├── public
│ │ └── index.html
│ └── .wws.toml
├── components
│ ├── .gitignore
│ ├── wasi-component-adapter
│ │ ├── wasi_snapshot_preview1-command.wasm
│ │ └── wasi_snapshot_preview1-reactor.wasm
│ └── README.md
├── containers
│ ├── .gitignore
│ ├── apps-src
│ │ ├── tmp
│ │ │ └── file.txt
│ │ ├── user-generation-python
│ │ │ ├── tmp
│ │ │ ├── index.toml
│ │ │ └── index.py
│ │ ├── user-generation-ruby
│ │ │ ├── tmp
│ │ │ ├── index.toml
│ │ │ └── index.rb
│ │ ├── user-generation-go
│ │ │ ├── .gitignore
│ │ │ ├── vendor
│ │ │ │ ├── github.com
│ │ │ │ │ ├── tidwall
│ │ │ │ │ │ ├── gjson
│ │ │ │ │ │ │ ├── logo.png
│ │ │ │ │ │ │ └── LICENSE
│ │ │ │ │ │ ├── sjson
│ │ │ │ │ │ │ ├── logo.png
│ │ │ │ │ │ │ └── LICENSE
│ │ │ │ │ │ ├── match
│ │ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ │ └── LICENSE
│ │ │ │ │ │ └── pretty
│ │ │ │ │ │ │ └── LICENSE
│ │ │ │ │ └── vmware-labs
│ │ │ │ │ │ └── wasm-workers-server
│ │ │ │ │ │ ├── NOTICE
│ │ │ │ │ │ └── kits
│ │ │ │ │ │ └── go
│ │ │ │ │ │ └── worker
│ │ │ │ │ │ └── doc.go
│ │ │ │ └── modules.txt
│ │ │ ├── user-generation-go.toml
│ │ │ ├── go.mod
│ │ │ └── go.sum
│ │ ├── user-generation-rust
│ │ │ ├── .gitignore
│ │ │ ├── rust-toolchain.toml
│ │ │ ├── .cargo
│ │ │ │ └── config.toml
│ │ │ ├── user-generation-rust.toml
│ │ │ └── Cargo.toml
│ │ └── user-generation-js
│ │ │ ├── user-generation-js.toml
│ │ │ └── user-generation-js.js
│ ├── apps
│ │ └── root
│ │ │ ├── user-generation-python
│ │ │ ├── tmp
│ │ │ │ └── file.txt
│ │ │ ├── index.toml
│ │ │ └── index.py
│ │ │ ├── user-generation-ruby
│ │ │ ├── tmp
│ │ │ │ └── file.txt
│ │ │ ├── index.toml
│ │ │ └── index.rb
│ │ │ ├── user-generation-go.toml
│ │ │ ├── user-generation-js.toml
│ │ │ ├── user-generation-rust.toml
│ │ │ └── user-generation-js.js
│ └── tmp
│ │ └── file.txt
├── rust-wasi-nn
│ ├── _images
│ │ └── .gitkeep
│ ├── .gitignore
│ ├── inference.wasm
│ ├── inference.toml
│ ├── Cargo.toml
│ ├── prepare.sh
│ └── public
│ │ ├── main.css
│ │ └── main.js
├── rust-wasi-nn-preload
│ ├── _images
│ │ └── .gitkeep
│ ├── _models
│ │ └── mobilenet
│ │ │ └── .gitkeep
│ ├── .gitignore
│ ├── inference.wasm
│ ├── inference.toml
│ ├── Cargo.toml
│ ├── prepare.sh
│ └── public
│ │ ├── main.css
│ │ └── main.js
├── python-libs
│ ├── requirements.txt
│ ├── _libs
│ │ └── .gitignore
│ ├── index.toml
│ ├── index.py
│ ├── README.md
│ └── .wws.toml
├── js-json
│ ├── public
│ │ └── robots.txt
│ ├── handler.toml
│ ├── README.md
│ └── handler.js
├── python-mount
│ ├── _assets
│ │ └── index.html
│ ├── index.toml
│ ├── index.py
│ ├── README.md
│ └── .wws.toml
├── ruby-mount
│ ├── image.toml
│ ├── public
│ │ ├── css
│ │ │ └── styles.css
│ │ └── index.html
│ ├── image.rb
│ ├── README.md
│ └── .wws.toml
├── go-kv
│ ├── counter.toml
│ ├── README.md
│ └── counter.go
├── python-kv
│ ├── counter.toml
│ ├── counter.py
│ ├── README.md
│ └── .wws.toml
├── ruby-kv
│ ├── counter.toml
│ ├── counter.rb
│ ├── README.md
│ └── .wws.toml
├── js-tictactoe
│ ├── handler.toml
│ └── README.md
├── rust-basic
│ ├── rust-basic.toml
│ ├── Cargo.toml
│ └── README.md
├── rust-kv
│ ├── rust-kv.toml
│ ├── Cargo.toml
│ ├── README.md
│ └── src
│ │ └── main.rs
├── zig-kv
│ ├── zig-out
│ │ └── bin
│ │ │ └── worker-kv.toml
│ ├── README.md
│ └── build.zig
├── zig-mount
│ ├── zig-out
│ │ └── bin
│ │ │ └── mount.toml
│ ├── src
│ │ └── mount.zig
│ └── build.zig
├── go-envs
│ ├── envs.toml
│ ├── envs.go
│ └── README.md
├── python-envs
│ ├── envs.toml
│ ├── envs.py
│ ├── README.md
│ └── .wws.toml
├── ruby-envs
│ ├── envs.toml
│ ├── envs.rb
│ ├── README.md
│ └── .wws.toml
├── zig-envs
│ ├── zig-out
│ │ └── bin
│ │ │ └── envs.toml
│ ├── src
│ │ └── envs.zig
│ ├── build.zig
│ └── README.md
├── go-fetch
│ ├── index.toml
│ ├── go.mod
│ ├── README.md
│ ├── go.sum
│ └── main.go
├── js-fetch
│ ├── index.toml
│ └── README.md
├── rust-fetch
│ ├── index.toml
│ ├── Cargo.toml
│ └── README.md
├── rust-params
│ ├── Cargo.toml
│ ├── public
│ │ └── main.css
│ ├── README.md
│ └── src
│ │ └── main.rs
├── rust-pdf-create
│ ├── Cargo.toml
│ ├── README.md
│ └── src
│ │ └── main.rs
├── go-basic
│ ├── go.mod
│ ├── README.md
│ └── go.sum
├── go-params
│ ├── public
│ │ └── main.css
│ ├── README.md
│ └── main.go
├── js-params
│ ├── public
│ │ └── main.css
│ ├── README.md
│ ├── fixed.js
│ ├── [id].js
│ ├── sub
│ │ └── [id].js
│ └── [id]
│ │ └── fixed.js
├── js-hono
│ ├── src
│ │ ├── package.json
│ │ └── index.js
│ └── README.md
├── ruby-basic
│ ├── README.md
│ ├── index.rb
│ └── .wws.toml
├── python-basic
│ ├── README.md
│ ├── index.py
│ └── .wws.toml
├── js-basic
│ └── README.md
├── js-async
│ └── README.md
├── js-modules
│ ├── README.md
│ └── index.js
├── js-redirect
│ ├── README.md
│ └── handler.js
├── js-catchall
│ └── README.md
├── zig-basic
│ ├── README.md
│ └── build.zig
├── zig-params
│ ├── README.md
│ ├── src
│ │ └── worker-params.zig
│ └── build.zig
├── README.md
└── Makefile
├── kits
├── javascript
│ ├── .gitignore
│ ├── wasm-workers-quick-js-engine.wasm
│ ├── src
│ │ └── error.rs
│ ├── Makefile
│ ├── shims
│ │ ├── types
│ │ │ ├── index.js
│ │ │ ├── cache.js
│ │ │ ├── request.js
│ │ │ └── headers.js
│ │ └── package.json
│ ├── README.md
│ ├── Cargo.toml
│ └── build.rs
├── go
│ └── worker
│ │ ├── bindings
│ │ └── bindings_component_type.o
│ │ └── doc.go
└── rust
│ ├── src
│ ├── cache.rs
│ ├── lib.rs
│ └── content.rs
│ ├── worker
│ ├── src
│ │ ├── lib.rs
│ │ └── args.rs
│ └── Cargo.toml
│ └── Cargo.toml
├── .gitignore
├── metadata
└── repository
│ └── v1
│ └── files
│ ├── ruby
│ ├── 3
│ │ ├── wrapper.txt
│ │ └── poly.rb
│ └── 3-1
│ │ └── wrapper.txt
│ └── python
│ ├── 3
│ ├── wrapper.txt
│ └── poly.py
│ └── 3-1
│ ├── wrapper.txt
│ └── poly.py
├── src
├── utils
│ ├── mod.rs
│ └── options.rs
├── commands
│ ├── mod.rs
│ └── main.rs
└── lib.rs
├── wit
├── core
│ ├── http.wit
│ └── http-types.wit
└── go-ephemeral
│ ├── http.wit
│ └── http-types.wit
├── go.mod
├── NOTICE
├── Makefile
├── go.sum
└── image
├── Prebuilt.dockerfile
└── Dockerfile
/docs/static/.nojekyll:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/data/public/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/data/public/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/data/public/main.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/crates/panel/client/dist/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/protomaps/_maps/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/crates/panel/client/public/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/crates/project/tests/data/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/components/.gitignore:
--------------------------------------------------------------------------------
1 | /rust-*
--------------------------------------------------------------------------------
/examples/containers/.gitignore:
--------------------------------------------------------------------------------
1 | /dist
--------------------------------------------------------------------------------
/examples/protomaps/_libs/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/rust-wasi-nn/_images/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/data/params/[id].wasm:
--------------------------------------------------------------------------------
1 | asm
--------------------------------------------------------------------------------
/tests/data/params/fixed.wasm:
--------------------------------------------------------------------------------
1 | asm
--------------------------------------------------------------------------------
/tests/data/public/about/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/crates/router/tests/data/files/_home.ext:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/crates/router/tests/data/files/_index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/crates/router/tests/data/files/examples.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/crates/router/tests/data/files/home.ext:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/crates/router/tests/data/files/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/crates/router/tests/data/files/public.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/data/params/[id]/fixed.wasm:
--------------------------------------------------------------------------------
1 | asm
--------------------------------------------------------------------------------
/tests/data/params/[id]/sub.wasm:
--------------------------------------------------------------------------------
1 | asm
--------------------------------------------------------------------------------
/tests/data/params/sub/[...all].wasm:
--------------------------------------------------------------------------------
1 | asm
--------------------------------------------------------------------------------
/tests/data/params/sub/[id].wasm:
--------------------------------------------------------------------------------
1 | asm
--------------------------------------------------------------------------------
/crates/router/tests/data/files/examples/home.ext:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/crates/router/tests/data/files/public/home.ext:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/crates/router/tests/data/files/public/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/rust-wasi-nn-preload/_images/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/data/params/sub/sub/[...all].wasm:
--------------------------------------------------------------------------------
1 | asm
--------------------------------------------------------------------------------
/crates/panel/src/handlers/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod panel;
2 |
--------------------------------------------------------------------------------
/crates/router/tests/data/files/_internal/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/crates/router/tests/data/files/examples/public.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/crates/router/tests/data/files/examples/_index/home.ext:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/crates/router/tests/data/files/examples/_index/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/crates/router/tests/data/files/examples/index/home.ext:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/crates/router/tests/data/files/examples/index/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/python-libs/requirements.txt:
--------------------------------------------------------------------------------
1 | beautifulsoup4
2 |
--------------------------------------------------------------------------------
/examples/rust-wasi-nn-preload/_models/mobilenet/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/crates/router/tests/data/files/examples/index/public/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/containers/apps-src/tmp/file.txt:
--------------------------------------------------------------------------------
1 | Some contents
2 |
--------------------------------------------------------------------------------
/examples/containers/apps-src/user-generation-python/tmp:
--------------------------------------------------------------------------------
1 | ../tmp/
--------------------------------------------------------------------------------
/examples/containers/apps-src/user-generation-ruby/tmp:
--------------------------------------------------------------------------------
1 | ../tmp/
--------------------------------------------------------------------------------
/examples/python-libs/_libs/.gitignore:
--------------------------------------------------------------------------------
1 | !.gitignore
2 | **/
3 |
--------------------------------------------------------------------------------
/examples/containers/apps-src/user-generation-go/.gitignore:
--------------------------------------------------------------------------------
1 | *.wasm
--------------------------------------------------------------------------------
/examples/js-json/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow: /
3 |
--------------------------------------------------------------------------------
/examples/containers/apps-src/user-generation-rust/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 |
--------------------------------------------------------------------------------
/examples/containers/apps/root/user-generation-python/tmp/file.txt:
--------------------------------------------------------------------------------
1 | Some content
2 |
--------------------------------------------------------------------------------
/examples/containers/apps/root/user-generation-ruby/tmp/file.txt:
--------------------------------------------------------------------------------
1 | Some content
2 |
--------------------------------------------------------------------------------
/examples/containers/tmp/file.txt:
--------------------------------------------------------------------------------
1 | Mount contents coming from the Docker Host :)
2 |
--------------------------------------------------------------------------------
/examples/python-mount/_assets/index.html:
--------------------------------------------------------------------------------
1 |
This page was loaded from a mounted file!
--------------------------------------------------------------------------------
/kits/javascript/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | dist
3 | package-lock.json
4 |
5 | !*.wasm
6 |
--------------------------------------------------------------------------------
/examples/protomaps/.gitignore:
--------------------------------------------------------------------------------
1 | # Python cache
2 | __pycache__
3 |
4 | # Ignore maps
5 | _maps/planet.pmtiles
--------------------------------------------------------------------------------
/examples/rust-wasi-nn/.gitignore:
--------------------------------------------------------------------------------
1 | _images/image.jpg
2 | _models/*.bin
3 | _models/*.xml
4 | !inference.wasm
--------------------------------------------------------------------------------
/examples/containers/apps-src/user-generation-rust/rust-toolchain.toml:
--------------------------------------------------------------------------------
1 | [toolchain]
2 | targets = ["wasm32-wasi"]
--------------------------------------------------------------------------------
/examples/ruby-mount/image.toml:
--------------------------------------------------------------------------------
1 | version = "1"
2 |
3 | [[folders]]
4 | from = "./_images"
5 | to = "/src/images"
--------------------------------------------------------------------------------
/examples/go-kv/counter.toml:
--------------------------------------------------------------------------------
1 | name = "counter"
2 | version = "1"
3 |
4 | [data]
5 | [data.kv]
6 | namespace = "counter"
--------------------------------------------------------------------------------
/examples/python-mount/index.toml:
--------------------------------------------------------------------------------
1 | version = "1"
2 |
3 | [[folders]]
4 | from = "./_assets"
5 | to = "/src/assets"
6 |
--------------------------------------------------------------------------------
/docs/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3 | };
4 |
--------------------------------------------------------------------------------
/examples/python-kv/counter.toml:
--------------------------------------------------------------------------------
1 | name = "counter"
2 | version = "1"
3 |
4 | [data]
5 | [data.kv]
6 | namespace = "counter"
--------------------------------------------------------------------------------
/examples/ruby-kv/counter.toml:
--------------------------------------------------------------------------------
1 | name = "counter"
2 | version = "1"
3 |
4 | [data]
5 | [data.kv]
6 | namespace = "counter"
--------------------------------------------------------------------------------
/examples/rust-wasi-nn-preload/.gitignore:
--------------------------------------------------------------------------------
1 | _images/image.jpg
2 | _models/**/*.bin
3 | _models/**/*.xml
4 | !inference.wasm
5 |
--------------------------------------------------------------------------------
/crates/project/src/types/mod.rs:
--------------------------------------------------------------------------------
1 | // Copyright 2023 VMware, Inc.
2 | // SPDX-License-Identifier: Apache-2.0
3 |
4 | pub mod git;
5 |
--------------------------------------------------------------------------------
/examples/js-tictactoe/handler.toml:
--------------------------------------------------------------------------------
1 | name = "tictactoe"
2 | version = "1"
3 |
4 | [data]
5 | [data.kv]
6 | namespace = "tictactoe"
7 |
--------------------------------------------------------------------------------
/examples/rust-basic/rust-basic.toml:
--------------------------------------------------------------------------------
1 | name = "envs"
2 | version = "1"
3 |
4 | [vars]
5 | MESSAGE = "Hello from Wasm Workers Server!"
--------------------------------------------------------------------------------
/crates/api-manage/src/handlers/mod.rs:
--------------------------------------------------------------------------------
1 | // Copyright 2023 VMware, Inc.
2 | // SPDX-License-Identifier: Apache-2.0
3 |
4 | pub mod v0;
5 |
--------------------------------------------------------------------------------
/crates/worker/src/bindings/mod.rs:
--------------------------------------------------------------------------------
1 | // Copyright 2023 VMware, Inc.
2 | // SPDX-License-Identifier: Apache-2.0
3 |
4 | pub mod http;
5 |
--------------------------------------------------------------------------------
/examples/rust-kv/rust-kv.toml:
--------------------------------------------------------------------------------
1 | name = "counter"
2 | version = "1"
3 |
4 | [data]
5 | [data.kv]
6 | namespace = "counter"
7 |
8 | [vars]
--------------------------------------------------------------------------------
/examples/zig-kv/zig-out/bin/worker-kv.toml:
--------------------------------------------------------------------------------
1 | name = "workerkv"
2 | version = "1"
3 |
4 | [data]
5 | [data.kv]
6 | namespace = "workerkv"
--------------------------------------------------------------------------------
/examples/protomaps/_maps/map.pmtiles:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vmware-labs/wasm-workers-server/HEAD/examples/protomaps/_maps/map.pmtiles
--------------------------------------------------------------------------------
/examples/rust-wasi-nn/inference.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vmware-labs/wasm-workers-server/HEAD/examples/rust-wasi-nn/inference.wasm
--------------------------------------------------------------------------------
/examples/zig-mount/zig-out/bin/mount.toml:
--------------------------------------------------------------------------------
1 | name = "envs"
2 | version = "1"
3 |
4 | [[folders]]
5 | from = "./_images"
6 | to = "/src/images"
--------------------------------------------------------------------------------
/crates/api-manage/src/handlers/v0/mod.rs:
--------------------------------------------------------------------------------
1 | // Copyright 2023 VMware, Inc.
2 | // SPDX-License-Identifier: Apache-2.0
3 |
4 | pub mod workers;
5 |
--------------------------------------------------------------------------------
/examples/go-envs/envs.toml:
--------------------------------------------------------------------------------
1 | name = "envs"
2 | version = "1"
3 |
4 | [vars]
5 | MESSAGE = "Hello! This message comes from an environment variable"
--------------------------------------------------------------------------------
/examples/python-envs/envs.toml:
--------------------------------------------------------------------------------
1 | name = "envs"
2 | version = "1"
3 |
4 | [vars]
5 | MESSAGE = "Hello! This message comes from an environment variable"
--------------------------------------------------------------------------------
/examples/ruby-envs/envs.toml:
--------------------------------------------------------------------------------
1 | name = "envs"
2 | version = "1"
3 |
4 | [vars]
5 | MESSAGE = "Hello! This message comes from an environment variable"
--------------------------------------------------------------------------------
/docs/static/img/docs/features/wasi-nn.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vmware-labs/wasm-workers-server/HEAD/docs/static/img/docs/features/wasi-nn.webp
--------------------------------------------------------------------------------
/examples/js-json/handler.toml:
--------------------------------------------------------------------------------
1 | name = "test"
2 | version = "1"
3 |
4 | [vars]
5 | MESSAGE = "Hello 👋! This message comes from an environment variable"
--------------------------------------------------------------------------------
/examples/ruby-mount/public/css/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | text-align: center;
3 | }
4 |
5 | img {
6 | margin: 4rem 0 2rem;
7 | width: 250px;
8 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | target
2 | *.wasm
3 | !tests/**/*.wasm
4 | examples/*.toml
5 | .DS_Store
6 | .wws
7 | **/zig-cache
8 | **/zig-out
9 | node_modules
10 |
--------------------------------------------------------------------------------
/examples/rust-wasi-nn-preload/inference.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vmware-labs/wasm-workers-server/HEAD/examples/rust-wasi-nn-preload/inference.wasm
--------------------------------------------------------------------------------
/examples/zig-envs/zig-out/bin/envs.toml:
--------------------------------------------------------------------------------
1 | name = "envs"
2 | version = "1"
3 |
4 | [vars]
5 | MESSAGE = "Hello! This message comes from an environment variable"
--------------------------------------------------------------------------------
/metadata/repository/v1/files/ruby/3/wrapper.txt:
--------------------------------------------------------------------------------
1 | require_relative "./poly";
2 |
3 | {source}
4 |
5 | puts "#{worker(json_to_request($stdin.gets.to_s))}"
6 |
--------------------------------------------------------------------------------
/docs/docs/features/_category_.json:
--------------------------------------------------------------------------------
1 | {
2 | "label": "Features",
3 | "position": 2,
4 | "link": {
5 | "type": "doc",
6 | "id": "all"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/examples/containers/apps-src/user-generation-ruby/index.toml:
--------------------------------------------------------------------------------
1 | name = "user-generation-ruby"
2 | version = "1"
3 |
4 | [[folders]]
5 | from = "./tmp"
6 | to = "/tmp"
--------------------------------------------------------------------------------
/metadata/repository/v1/files/ruby/3-1/wrapper.txt:
--------------------------------------------------------------------------------
1 | require_relative "./poly";
2 |
3 | {source}
4 |
5 | puts "#{worker(json_to_request($stdin.gets.to_s))}"
6 |
--------------------------------------------------------------------------------
/src/utils/mod.rs:
--------------------------------------------------------------------------------
1 | // Copyright 2023 VMware, Inc.
2 | // SPDX-License-Identifier: Apache-2.0
3 |
4 | pub mod errors;
5 | pub mod options;
6 | pub mod runtimes;
7 |
--------------------------------------------------------------------------------
/docs/docs/get-started/_category_.json:
--------------------------------------------------------------------------------
1 | {
2 | "label": "Wasm Workers Server",
3 | "position": 1,
4 | "collapsed": false,
5 | "collapsible": false
6 | }
--------------------------------------------------------------------------------
/examples/containers/apps-src/user-generation-python/index.toml:
--------------------------------------------------------------------------------
1 | name = "user-generation-python"
2 | version = "1"
3 |
4 | [[folders]]
5 | from = "./tmp"
6 | to = "/tmp"
--------------------------------------------------------------------------------
/examples/containers/apps/root/user-generation-python/index.toml:
--------------------------------------------------------------------------------
1 | name = "user-generation-python"
2 | version = "1"
3 |
4 | [[folders]]
5 | from = "./tmp"
6 | to = "/tmp"
--------------------------------------------------------------------------------
/examples/containers/apps/root/user-generation-ruby/index.toml:
--------------------------------------------------------------------------------
1 | name = "user-generation-ruby"
2 | version = "1"
3 |
4 | [[folders]]
5 | from = "./tmp"
6 | to = "/tmp"
--------------------------------------------------------------------------------
/kits/go/worker/bindings/bindings_component_type.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vmware-labs/wasm-workers-server/HEAD/kits/go/worker/bindings/bindings_component_type.o
--------------------------------------------------------------------------------
/kits/javascript/wasm-workers-quick-js-engine.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vmware-labs/wasm-workers-server/HEAD/kits/javascript/wasm-workers-quick-js-engine.wasm
--------------------------------------------------------------------------------
/examples/go-fetch/index.toml:
--------------------------------------------------------------------------------
1 | name = "go-fetch"
2 | version = "1"
3 |
4 | [features]
5 | [features.http_requests]
6 | allowed_hosts = ["jsonplaceholder.typicode.com"]
7 |
--------------------------------------------------------------------------------
/examples/js-fetch/index.toml:
--------------------------------------------------------------------------------
1 | name = "js-fetch"
2 | version = "1"
3 |
4 | [features]
5 | [features.http_requests]
6 | allowed_hosts = ["jsonplaceholder.typicode.com"]
7 |
--------------------------------------------------------------------------------
/crates/panel/client/.gitignore:
--------------------------------------------------------------------------------
1 | package-lock.json
2 | node_modules
3 |
4 | # Keep the dist folder to avoid errors when the client is not built.
5 | dist/*
6 | !dist/.gitkeep
7 |
--------------------------------------------------------------------------------
/examples/rust-fetch/index.toml:
--------------------------------------------------------------------------------
1 | name = "rust-fetch"
2 | version = "1"
3 |
4 | [features]
5 | [features.http_requests]
6 | allowed_hosts = ["jsonplaceholder.typicode.com"]
7 |
--------------------------------------------------------------------------------
/metadata/repository/v1/files/python/3-1/wrapper.txt:
--------------------------------------------------------------------------------
1 | from poly import *
2 |
3 | {source}
4 |
5 | res = worker(Request(json.loads(sys.stdin.read())))
6 | print(res.to_json())
7 |
--------------------------------------------------------------------------------
/metadata/repository/v1/files/python/3/wrapper.txt:
--------------------------------------------------------------------------------
1 | from poly import *
2 |
3 | {source}
4 |
5 | res = worker(Request(json.loads(sys.stdin.read())))
6 | print(res.to_json())
7 |
--------------------------------------------------------------------------------
/crates/server/src/handlers/mod.rs:
--------------------------------------------------------------------------------
1 | // Copyright 2022 VMware, Inc.
2 | // SPDX-License-Identifier: Apache-2.0
3 |
4 | pub mod assets;
5 | pub mod not_found;
6 | pub mod worker;
7 |
--------------------------------------------------------------------------------
/examples/containers/apps-src/user-generation-rust/.cargo/config.toml:
--------------------------------------------------------------------------------
1 | [build]
2 | target = "wasm32-wasi"
3 | rustflags = ["-Cstrip=symbols", "-Copt-level=z", "-Cpanic=abort", "-Cdebuginfo=none"]
--------------------------------------------------------------------------------
/wit/core/http.wit:
--------------------------------------------------------------------------------
1 | use * from http-types
2 |
3 | // Send a HTTP request from inside the worker.
4 | send-http-request: func(request: http-request) -> expected
5 |
--------------------------------------------------------------------------------
/crates/worker/src/features/mod.rs:
--------------------------------------------------------------------------------
1 | // Copyright 2023 VMware, Inc.
2 | // SPDX-License-Identifier: Apache-2.0
3 |
4 | pub mod data;
5 | pub mod folders;
6 | pub mod http_requests;
7 | pub mod wasi_nn;
8 |
--------------------------------------------------------------------------------
/examples/python-libs/index.toml:
--------------------------------------------------------------------------------
1 | name = "libs"
2 | version = "1"
3 |
4 | [vars]
5 | PYTHONPATH = "/opt/python/libs"
6 |
7 | [[folders]]
8 | from = "./_libs"
9 | to = "/opt/python/libs"
10 |
--------------------------------------------------------------------------------
/examples/ruby-envs/envs.rb:
--------------------------------------------------------------------------------
1 | # Read an environment variable in Ruby
2 | def worker(request)
3 | Response.new(
4 | "The environment variable value is: #{ENV.fetch('MESSAGE')}"
5 | )
6 | end
--------------------------------------------------------------------------------
/examples/rust-kv/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "rust-kv"
3 | version = "0.1.0"
4 | edition = "2021"
5 |
6 | [dependencies]
7 | anyhow = "1.0.63"
8 | wasm-workers-rs = { path = "../../kits/rust" }
9 |
--------------------------------------------------------------------------------
/crates/runtimes/src/modules/mod.rs:
--------------------------------------------------------------------------------
1 | // Copyright 2022 VMware, Inc.
2 | // SPDX-License-Identifier: Apache-2.0
3 |
4 | pub(crate) mod external;
5 | pub(crate) mod javascript;
6 | pub(crate) mod native;
7 |
--------------------------------------------------------------------------------
/examples/rust-basic/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "rust-basic"
3 | version = "0.1.0"
4 | edition = "2021"
5 |
6 | [dependencies]
7 | anyhow = "1.0.63"
8 | wasm-workers-rs = { path = "../../kits/rust" }
9 |
--------------------------------------------------------------------------------
/src/commands/mod.rs:
--------------------------------------------------------------------------------
1 | // Copyright 2022 VMware, Inc.
2 | // SPDX-License-Identifier: Apache-2.0
3 |
4 | // The different commands for the `wws` CLI.
5 | pub(crate) mod main;
6 | pub(crate) mod runtimes;
7 |
--------------------------------------------------------------------------------
/examples/python-mount/index.py:
--------------------------------------------------------------------------------
1 | # Read a mounted file and return it
2 | def worker(request):
3 | s = ""
4 | with open("/src/assets/index.html") as f:
5 | s = f.read()
6 |
7 | return Response(s)
--------------------------------------------------------------------------------
/examples/rust-params/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "rust-params"
3 | version = "0.1.0"
4 | edition = "2021"
5 |
6 | [dependencies]
7 | anyhow = "1.0.63"
8 | wasm-workers-rs = { path = "../../kits/rust" }
9 |
--------------------------------------------------------------------------------
/crates/panel/client/src/components/content.scss:
--------------------------------------------------------------------------------
1 | // Copyright 2023 VMware, Inc.
2 | // SPDX-License-Identifier: Apache-2.0
3 |
4 | .content {
5 | &>*:first-child {
6 | margin-top: 0;
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/examples/components/wasi-component-adapter/wasi_snapshot_preview1-command.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vmware-labs/wasm-workers-server/HEAD/examples/components/wasi-component-adapter/wasi_snapshot_preview1-command.wasm
--------------------------------------------------------------------------------
/examples/components/wasi-component-adapter/wasi_snapshot_preview1-reactor.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vmware-labs/wasm-workers-server/HEAD/examples/components/wasi-component-adapter/wasi_snapshot_preview1-reactor.wasm
--------------------------------------------------------------------------------
/crates/api-manage/src/models/mod.rs:
--------------------------------------------------------------------------------
1 | // Copyright 2023 VMware, Inc.
2 | // SPDX-License-Identifier: Apache-2.0
3 |
4 | mod worker;
5 | mod worker_config;
6 |
7 | pub use worker::Worker;
8 | pub use worker_config::WorkerConfig;
9 |
--------------------------------------------------------------------------------
/kits/rust/src/cache.rs:
--------------------------------------------------------------------------------
1 | // Copyright 2022 VMware, Inc.
2 | // SPDX-License-Identifier: Apache-2.0
3 |
4 | use std::collections::HashMap;
5 |
6 | /// A cache system based on snapshots.
7 | pub type Cache = HashMap;
8 |
--------------------------------------------------------------------------------
/docs/docs/languages/_category_.json:
--------------------------------------------------------------------------------
1 | {
2 | "label": "Supported languages",
3 | "position": 3,
4 | "collapsed": false,
5 | "collapsible": false,
6 | "link": {
7 | "type": "doc",
8 | "id": "introduction"
9 | }
10 | }
--------------------------------------------------------------------------------
/examples/containers/apps-src/user-generation-go/vendor/github.com/tidwall/gjson/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vmware-labs/wasm-workers-server/HEAD/examples/containers/apps-src/user-generation-go/vendor/github.com/tidwall/gjson/logo.png
--------------------------------------------------------------------------------
/examples/containers/apps-src/user-generation-go/vendor/github.com/tidwall/sjson/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vmware-labs/wasm-workers-server/HEAD/examples/containers/apps-src/user-generation-go/vendor/github.com/tidwall/sjson/logo.png
--------------------------------------------------------------------------------
/examples/protomaps/[z]/[x]/[y]/index.toml:
--------------------------------------------------------------------------------
1 | version = "1"
2 |
3 | [vars]
4 | MAP_FILE = "map"
5 |
6 | [[folders]]
7 | from = "../../../_libs"
8 | to = "/src/libs"
9 |
10 | [[folders]]
11 | from = "../../../_maps"
12 | to = "/src/maps"
--------------------------------------------------------------------------------
/examples/python-envs/envs.py:
--------------------------------------------------------------------------------
1 | import os
2 |
3 | def worker(req):
4 | # Body response
5 | body = "The environment variable value is: {message}".format(
6 | message=os.getenv("MESSAGE")
7 | )
8 |
9 | return Response(body)
--------------------------------------------------------------------------------
/kits/javascript/src/error.rs:
--------------------------------------------------------------------------------
1 | // Copyright 2023 VMware, Inc.
2 | // SPDX-License-Identifier: Apache-2.0
3 |
4 | /// List of runtime errors
5 | #[derive(Debug)]
6 | pub enum RuntimeError {
7 | InvalidBinding { invalid_export: String },
8 | }
9 |
--------------------------------------------------------------------------------
/crates/api-manage-openapi/src/lib.rs:
--------------------------------------------------------------------------------
1 | // Copyright 2023 VMware, Inc.
2 | // SPDX-License-Identifier: Apache-2.0
3 |
4 | /// Contains the Open API Spec of the wws management API.
5 | pub static OPEN_API_SPEC: &str = include_str!("./openapi.json");
6 |
--------------------------------------------------------------------------------
/examples/rust-pdf-create/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "rust-pdf-create"
3 | version = "0.1.0"
4 | edition = "2021"
5 |
6 | [dependencies]
7 | anyhow = "1.0.63"
8 | wasm-workers-rs = { path = "../../kits/rust" }
9 | printpdf = "0.5.3"
10 |
--------------------------------------------------------------------------------
/crates/panel/client/src/components/header.scss:
--------------------------------------------------------------------------------
1 | // Copyright 2023 VMware, Inc.
2 | // SPDX-License-Identifier: Apache-2.0
3 |
4 | header.header {
5 | background: var(--cds-global-color-blue-1000);
6 | color: var(--cds-global-color-gray-0);
7 | }
8 |
--------------------------------------------------------------------------------
/examples/ruby-mount/image.rb:
--------------------------------------------------------------------------------
1 | # Read an environment variable in Ruby
2 | def worker(request)
3 | img = IO.read("/src/images/ruby.svg", mode: "rb")
4 |
5 | res = Response.new(img)
6 | res.headers["Content-Type"] = "image/svg+xml"
7 |
8 | res
9 | end
--------------------------------------------------------------------------------
/src/lib.rs:
--------------------------------------------------------------------------------
1 | // Copyright 2023 VMware, Inc.
2 | // SPDX-License-Identifier: Apache-2.0
3 |
4 | #[cfg(feature = "wws_config")]
5 | pub use wws_config;
6 | #[cfg(feature = "wws_router")]
7 | pub use wws_router;
8 | #[cfg(feature = "wws_server")]
9 | pub use wws_server;
10 |
--------------------------------------------------------------------------------
/crates/store/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "wws-store"
3 | version = { workspace = true }
4 | edition = { workspace = true }
5 | authors = { workspace = true }
6 | license = { workspace = true }
7 | repository = { workspace = true }
8 |
9 | [dependencies]
10 | blake3 = "1.3.3"
--------------------------------------------------------------------------------
/examples/components/README.md:
--------------------------------------------------------------------------------
1 | # Component model examples
2 |
3 | This directory contains core module examples found in the parent
4 | directory, adapted with the
5 | [`wasi-component-adapter`](./wasi-component-adapter/README.md) so that they are
6 | converted to WebAssembly components.
7 |
--------------------------------------------------------------------------------
/docs/src/components/HomepageFeatures/styles.module.css:
--------------------------------------------------------------------------------
1 | .features {
2 | display: flex;
3 | align-items: center;
4 | padding: 2rem 0;
5 | width: 100%;
6 | }
7 |
8 | .featureEmoji {
9 | font-size: 4rem;
10 | }
11 |
12 | .featureDescription {
13 | font-size: 1.2rem;
14 | }
15 |
--------------------------------------------------------------------------------
/kits/javascript/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY: build build-src
2 |
3 | build-src:
4 | cargo build --target wasm32-wasi --release
5 |
6 | build: build-src
7 | wizer --allow-wasi --wasm-bulk-memory true -o ./wasm-workers-quick-js-engine.wasm ./target/wasm32-wasi/release/wasm-workers-quick-js-engine.wasm
8 |
--------------------------------------------------------------------------------
/examples/rust-fetch/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "rust-fetch"
3 | version = "0.1.0"
4 | edition = "2021"
5 |
6 | [dependencies]
7 | anyhow = "1.0.63"
8 | wasm-workers-rs = { path = "../../kits/rust" }
9 | serde = { version = "1.0", features = ["derive"] }
10 | serde_json = "1.0.85"
11 |
--------------------------------------------------------------------------------
/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/vmware-labs/wasm-workers-server
2 |
3 | go 1.20
4 |
5 | require (
6 | github.com/tidwall/gjson v1.14.4
7 | github.com/tidwall/sjson v1.2.5
8 | )
9 |
10 | require (
11 | github.com/tidwall/match v1.1.1 // indirect
12 | github.com/tidwall/pretty v1.2.1 // indirect
13 | )
14 |
--------------------------------------------------------------------------------
/kits/javascript/shims/types/index.js:
--------------------------------------------------------------------------------
1 | // Copyright 2023 VMware, Inc.
2 | // SPDX-License-Identifier: Apache-2.0
3 |
4 | // Import the different types.
5 | export { Headers } from "./headers";
6 | export { Request } from "./request";
7 | export { Response } from "./response";
8 | export { Cache } from "./cache";
9 |
--------------------------------------------------------------------------------
/examples/containers/apps/root/user-generation-go.toml:
--------------------------------------------------------------------------------
1 | name = "user-generation-go"
2 | version = "1"
3 |
4 | [data]
5 | [data.kv]
6 | namespace = "generated_users_counter"
7 |
8 | [[folders]]
9 | from = "./tmp"
10 | to = "/tmp"
11 |
12 | [features]
13 | [features.http_requests]
14 | allowed_hosts = ["random-data-api.com"]
--------------------------------------------------------------------------------
/docs/static/img/languages/zig.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/ruby-mount/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Ruby + Wasm Workers Server
4 |
5 |
6 |
7 |
8 | This image is served by Wasm Workers Server
9 |
10 |