✓
Passing This code compiles and runs correctly.
Code
// Cross-target stdlib parity: the idiomatic hello-world through std.io must
// produce identical output whether emitted to Zig or JS. `println` resolves
// across the module boundary (std.io is imported, module-qualified), and the
// JS target uses println's |js variant (console.log) while Zig uses |zig
// (std.debug.print). Same source, same output, two backends.
~import std/io
~std/io:print("Hello, world!\n")
Actual
Hello, world!
Expected output
✓ Zig✓ JavaScriptHello, world!
Emitted JavaScript source
const main_module = {
flow0() {
process.stdout.write("Hello, world!\n");
},
};
main_module.flow0();
Flows
flow ~print click a branch to expand · @labels scroll to their anchor
print (expr: "Hello, world!\n")
Test Configuration
MUST_RUN