wasi-sdk-nixos/README.md

36 lines
1,006 B
Markdown
Raw Permalink Normal View History

2025-07-19 20:57:49 +02:00
# wasi-sdk-nixos
WASM LLVM toolchain and WASI sysroot.
Similar to [WebAssembly/wasi-sdk](https://github.com/WebAssembly/wasi-sdk), but re-implemented for NixOS.
2024-05-02 17:38:17 +02:00
## Goals
2025-07-19 20:57:49 +02:00
* Lean C/C++ toolchain leveraging as much as possible from upstream sources.
2024-05-02 17:38:17 +02:00
* Basic levels of WASI (no threading, no exceptions).
2025-07-19 20:57:49 +02:00
## Versioning
Provided are the upstream versions that WebAssembly/wasi-sdk used mid 2024:
2024-05-02 17:38:17 +02:00
* LLVM: 17
* wasi-libc: 21
2025-07-19 20:57:49 +02:00
Future releases may upgrade these upstream versions.
2024-05-02 17:38:17 +02:00
## Usage
2025-07-19 20:57:49 +02:00
The default package contains all required dependencies in the following package subdirectories:
2024-05-02 17:38:17 +02:00
* `bin`: compilers (`clang`, `clang++`) and linker (`wasm-ld`)
* `include`: *libc* headers
* `include/c++/v1`: *libcxx* headers
* `lib`: all *libc* and *libcxx* static libraries
* `lib/wasi`: compiler-rt builtins static library
2025-07-19 20:57:49 +02:00
* `share/wasi-sysroot`: the WASI sysroot
For concrete usage examples, see [michaelfranzl/clang-wasm-browser-starterpack](https://github.com/michaelfranzl/clang-wasm-browser-starterpack).