Skip to content

Files

Latest commit

May 4, 2025
bededde · May 4, 2025

History

History
39 lines (25 loc) · 1019 Bytes

README.md

File metadata and controls

39 lines (25 loc) · 1019 Bytes

Zig and ZLS in the browser

Works pretty well in a bunch of browsers, but note the required security headers.

Installing

You can either:

npm install
npm run serve

Enjoy!

Update artifacts

For the time being, the following artifacts have been commited to source control:

  • src/zls.wasm - A build of ZLS (ReleaseSmall, wasm32-wasi, VERSION_TBA)
  • src/zig.wasm - A build of Zig (ReleaseSmall, wasm32-wasi, 0.14.0 with ./zig.patch applied)
  • src/zig.tar.gz - The source code of Zig. Only the lib/std subdirectory is needed.

The ./compile.sh script can be used to create these artifacts:

./compile zls
./compile zig
./compile zig_tarball

Compiling Zig and ZLS may require different Zig compiler versions.

TODOs

  • Stop using SharedArrayBuffers (they're awesome but a nightmare to deploy)