Zig and WASM

Zig + WASM.
Here’s how to compile and run a simple WebAssembly program with Zig 0.9.1. Save the following code to the file main.zig: Install Zig (eg. brew install zig) then run this command in the same folder as main.zig: We can now instantiate a WebAssembly runtime to execute the compiled code. The add function is an export of the instance. It can be invoked like any other function.

Read in full here:

This thread was posted by one of our members via one of our news source trackers.

Corresponding tweet for this thread:

Share link for this tweet.