Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Adds two integers and prints the result.
# zig/demo/add.zig
const std = @import("std");
pub export fn add(a: i32, b: i32) void {
std.debug.print("Sum: {d}\n", .{a + b});
}Zig is a general-purpose programming language designed for robustness, optimality, and simplicity. With Zig-Wasm, developers can compile Zig code to WebAssembly, enabling high-performance, low-level applications in the browser or other Wasm runtimes.
Origin & Creator
Zig is created by Andrew Kelley, with the community contributing to language development, compiler improvements, and WebAssembly support.
Industrial Note
Zig-Wasm is particularly useful for developers who need predictable, high-performance WebAssembly modules, low-level memory control, or integration with C/C++ codebases for web execution.