- Like C, but with garbage collection, memory safety, and special mechanisms for concurrency
- Pointers but no pointer arithmetic
- No header files
- Simple, clean syntax
- Very fast native compilation (about as quick to edit code and restart as a dynamic language)
- Easy-to-distribute executables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//A Zig version of emscipten's EM_ASM and EM_ASM_INT | |
//WARNING: I've only tested 32-bit and 64-bit ints and floats for arguments. Haven't tested other types e.g. bool | |
//Example: | |
//em_asm(.{"World!"}, | |
// \\const world = UTF8ToString($0); | |
// \\console.log(`Hello ${world}`); | |
// ); | |
pub inline fn em_asm(args: anytype, comptime script: anytype) void { |