-
Notifications
You must be signed in to change notification settings - Fork 3
Introduction
Chung Leong edited this page May 30, 2024
·
3 revisions
Zig is a general-purpose programming language and toolchain for maintaining robust, optimal and reusable software. Its powerful metaprogramming model allows it to interoperate easily with other languages, including dynamic ones like JavaScript.
const std = @import("std");
pub fn main() void {
std.debug.print("Hello world!", .{});
}
Zigar is a toolkit for running Zig code in a JavaScript environment. It lets you use Zig in web apps, server-side apps, and desktop apps. It consists of a runtime for accessing Zig data structures, adapters that perform call marshalling, and a module managing the compilation process.
import { main } from './hello.zig';
main();
Hello world!
Zigar allows you to:
- Create cross-platform desktop applications with full access to system resources and a UI powered by popular web tech like React and Svelte
- Create server-side applications with full access to system resources
- Create high-performance WebAssembly code for data-intensive operations in the web browser