HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
WebAssembly
wasi-sdk
CMake2019–2026
WebAssembly / wasi-sdk

wasi-sdk

WASI-enabled WebAssembly C/C++ toolchain

5Distinct people
10Mentions
0Explicit recommenders
1.7KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

WASI-enabled WebAssembly C/C++ toolchain

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year10 dated mentions

Observed mentions: 2019-06-02 18:22:02 UTC to 2026-06-12 17:03:56 UTC.

01232019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC202
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC303
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC101
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC101
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC101

What Hacker News says

10 sources
I used WASI to compile an existing 1990's 8-bit assembler cmdline tool written in C for use in a VSCode extension (https://marketplace.visualstudio.com/items?itemName=floooh.v...) - along with regular browser-based WASM compiled via Emscripten for the embedded emulators. For this use case the old-school POSIX-style WASI was just perfect and completely hassle-free via the WASI SDK (https://github.com/webassembly/wasi-sdk). Not sure what to think of all the bells and whistles that were added afterwards (esp the component model), the very first WASI standard was the perfect sweet-spot of simplicity and usefulness. I'm pretty sure I'll never need any of the things that were added afterwards (and I'm going to be slightly pissed when the simple use case - building and running POSIX code - gets more complicated).
In WASI 0.3
In VSCode extensions this is trivial, this is how you create the 'executable': https://github.com/floooh/vscode-kcide/blob/main/src/wasi.ts ...and this is how you run it: https://github.com/floooh/vscode-kcide/blob/2dfc621aade4a2be... The asmx.wasm file is a vanilla POSIX cmdline tool which loads and saves files via fopen/fread/frwrite/fclose, and the tool has been compiled with the WASI SDK: https://github.com/WebAssembly/wasi-sdk The resulting VSCode extension (https://marketplace.visualstudio.com/items?itemName=floooh.v...) then even runs in the VSCode browser version (https://vscode.dev/) But AFAIK there's currently no easy way to get a similar easy to use WASI wrapper in browsers (it's definitely possible though because the VSCode browser version does it - VSCode basically has a filesystem abstraction which works for native filesyste
Read the rest
ms as well as virtualized web filesystems like github repositories).
In WebAssembly from the Ground Up
It's a runtime for WASI blobs (basically a WASM based standard for crossplatform command line tools), for instance: emcc hello.c -o hello.wasm wasmer hello.wasm Hello World! This uses Emscripten as C compiler, but alternatively you can use the wasi-sdk toolchain instead of Emscripten to build WASI blobs: - https://github.com/WebAssembly/wasi-sdk ...or Zig as C compiler: zig cc -target wasm32-wasi hello.c -o hello.wasm wasmer hello.wasm Hello World! ...or of course Zig as Zig compiler :) zig -target wasm32-wasi hello.zig wasmer hello.wasm Hello World! (not sure if the Rust toolchain comes with builtin WASI support, but probably yes). ...or instead of wasmer use another WASI runtime: - https://github.com/wasmerio/awesome-wasi?tab=readme-ov-file#... ...this is probably the best part of WASM and WASI, th
Read the rest
ere's no 'vendor lock-in'.
In Wasmer 5.0
I would really love being able to take any POSIX command line tool, compile that to WASI, and run it on (at least) Linux, Windows and macOS like a regular executable without having to install a separate WASI runtime or any scare-popups showing up like on macOS. I'm a 'WASI convert' since I was able to take an ancient 8-bit assembler written in C89 in the mid-90's (http://xi6.com/projects/asmx/), compile that as-is with the WASI SDK (https://github.com/WebAssembly/wasi-sdk), and then integrate it into a VSCode extension (https://marketplace.visualstudio.com/items?itemName=floooh.v...). A similar problem I'd like to solve better is a shader cross-compiler (https://github.com/floooh/sokol-tools) which needs to run on Linux, macOS and Windows and takes too long to build locally, thus I currently need to distribute that as pre-built binaries.
Read the rest
Compiling this to WASI works, but the filesystem access restrictions built into current WASM runtimes are a bit of a hassle to manage, and a WASM runtime needs to be installed, which is also an additional step which shouldn't be needed.
In Stop Hiding the Sharp Knives: The WebAssembly Linux Interface
Just wrap the core functionality into a 'pure' WASM module which doesn't need to access 'system APIs', and then if needed write two thin wrappers, one for the 'web personality' and one for the 'WASI personality'. WASI has the advantage that many compilers support it directly, e.g. in Zig: > cat hello.zig const print = @import("std").debug.print; pub fn main() void { print("Hello World!\n", .{}); } > zig build-exe hello.zig -target wasm32-wasi > wasmtime hello.wasm Hello World! Or if you prefer C: > cat hello.c #include <stdio.h> int main() { printf("Hello World!\n"); } > zig cc hello.c -o hello.wasm -target wasm32-wasi > wasmtime hello.wasm Hello World! (I guess Rust can do the same, or for a purely clang-based solution see: https://github.com/WebAssembly/wasi-sdk)
Read the rest
. ...while for web compatibility, you'll always need some sort of shim solution to talk to the Javascript APIs.
In The tug-of-war over server-side WebAssembly
There's also the https://github.com/WebAssembly/wasi-sdk repo which is kind of a meta-build-system for all this. But in FreeBSD we build all the pieces directly, here's our build recipes (with some hacks due to llvm's cmake code being stupid sometimes): compiler-rt (from llvm): https://github.com/freebsd/freebsd-ports/blob/main/devel/was... libc (from what you linked): https://github.com/freebsd/freebsd-ports/blob/main/devel/was... libc++ (from llvm): https://github.com/freebsd/freebsd-ports/blob/main/devel/was...
In WebAssembly and Back Again: Fine-Grained Sandboxing in Firefox 95
> C without the standard library (called “libc”) is pretty rough If you don't want to pull in musl or a traditional libc, there's a more Wasm-y solution known as the Web Assembly System Interface (WASI) [0] that delegates the libc functionality to the runtime. A WASI Wasm module can be compiled using clang, as in the article. The only difference is to use the WASI sysroot [1]. > optimization LTO and -O3 are great! I've also found the Twiggy [2] tool useful for more "manual" optimization. [0] https://wasi.dev [1] https://github.com/CraneStation/wasi-sdk/releases [2] https://rustwasm.github.io/twiggy/
In Compiling C to WebAssembly Without Emscripten

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.