Skip to content

Commit

Permalink
feat: add Zig SDK and documentation (#196)
Browse files Browse the repository at this point in the history
* feat: add support for zig (#144)

* add wasi_exec_model reactor

* use custom request/response entities

* add params and env

* add example zig-basic

* add example zig-kv

* add example zig-params

* add example zig-envs

* add zig docs to example README

* add .gitignore to ignore zig build and cache directories

* add utf8 validity check

* add corrections to docs

Co-authored-by: Rafael Fernández López <[email protected]>

* rename writeHeader to setStatus

* rename s/data/body to be consistent with other languages

* rename s/bash/shell-session

Co-authored-by: Rafael Fernández López <[email protected]>

* add info for RequestAndOutput wrapper struct

* fix read input until EOF

---------

Co-authored-by: Rafael Fernández López <[email protected]>
  • Loading branch information
voigt and ereslibre authored Sep 5, 2023
1 parent 748e02c commit cb381a3
Show file tree
Hide file tree
Showing 24 changed files with 988 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ target
!tests/**/*.wasm
examples/*.toml
.DS_Store
.wws
.wws
**/zig-cache
**/zig-out
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Wasm Workers Server focuses on simplicity. We want you to run workers (written i
| Go | ✅ | No | [#95](https:/vmware-labs/wasm-workers-server/issues/95) |
| Ruby | ✅ | [Yes](https://workers.wasmlabs.dev/docs/languages/ruby#installation) | [#63](https:/vmware-labs/wasm-workers-server/issues/63) |
| Python | ✅ | [Yes](https://workers.wasmlabs.dev/docs/languages/python#installation) | [#63](https:/vmware-labs/wasm-workers-server/issues/63) |
| Zig | 🚧 | No | [#144](https:/vmware-labs/wasm-workers-server/issues/144) |
| Zig | | No | [#144](https:/vmware-labs/wasm-workers-server/issues/144) |
| PHP | 🚧 | No | [#100](https:/vmware-labs/wasm-workers-server/issues/100) |
To get more information about multi-language support in Wasm Workers Server, [check our documentation](https://workers.wasmlabs.dev/docs/languages/introduction).
Expand Down
1 change: 1 addition & 0 deletions docs/docs/features/all.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ The following table shows the language compatibility for the different worker fu
| Go ||||||
| Ruby ||||||
| Python ||||||
| Zig ||||||
2 changes: 2 additions & 0 deletions docs/docs/features/dynamic-routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Check these guides to understand how to read parameters in the different support
* [Dynamic routes in Python](../languages/python.md#dynamic-routes)
* [Dynamic routes in Ruby](../languages/ruby.md#dynamic-routes)
* [Dynamic routes in Go](../languages/go.md#dynamic-routes)
* [Dynamic routes in Zig](../languages/zig.md#dynamic-routes)

## Dynamic routes and folders

Expand Down Expand Up @@ -64,3 +65,4 @@ In this case, the `./[resource]/[id]/show.js` worker replies to URLs like `/arti
| Go ||
| Ruby ||
| Python ||
| Zig ||
1 change: 1 addition & 0 deletions docs/docs/features/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ This feature allows you to configure environment variables dynamically.
| Go ||
| Ruby ||
| Python ||
| Zig ||
1 change: 1 addition & 0 deletions docs/docs/features/http-requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ Check these guides to perform HTTP requests in the different supported languages
| Go ||
| Ruby ||
| Python ||
| Zig ||
2 changes: 2 additions & 0 deletions docs/docs/features/key-value.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ The worker may access all the data and perform changes over it. Then, a new K/V
* [Add a K/V store to Python workers](../languages/python.md#add-a-key--value-store)
* [Add a K/V store to Ruby workers](../languages/ruby.md#add-a-key--value-store)
* [Add a K/V store to Go workers](../languages/go.md#add-a-key--value-store)
* [Add a K/V store to Zig workers](../languages/zig.md#add-a-key--value-store)

## Limitations

Expand All @@ -35,3 +36,4 @@ A known limitation of the snapshot approach is the data override when concurrent
| Go ||
| Ruby ||
| Python ||
| Zig ||
1 change: 1 addition & 0 deletions docs/docs/features/mount-folders.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ Note that those folders may include files that `wws` recognizes as workers (like
| Go ||
| Ruby ||
| Python ||
| Zig ||
Loading

0 comments on commit cb381a3

Please sign in to comment.