authorgravatar for luuk@degram.devLuuk de Gram <luuk@degram.dev> 2023-11-01 15:56:30+01:00
committergravatar for luuk@degram.devLuuk de Gram <luuk@degram.dev> 2023-11-03 12:48:53+01:00
log5b2ee5eacc177873ce674a307a1bebdfffeeae10
tree066fbfa957ca31060f8b69e54d72177c410aa8c1
parent938f9dea374193972be05b19b58dced54d79b1cb
signature Commit is signed but in an unrecognized format.

docs: update WebAssembly freestanding example


1 files changed, 4 insertions(+), 4 deletions(-)

doc/langref.html.in+4-4
......@@ -11336,12 +11336,12 @@ all your base are belong to us{#end_shell_samp#}
1133611336 {#header_open|WebAssembly#}
1133711337 <p>Zig supports building for WebAssembly out of the box.</p>
1133811338 {#header_open|Freestanding#}
11339 <p>For host environments like the web browser and nodejs, build as a dynamic library using the freestanding
11339 <p>For host environments like the web browser and nodejs, build as an executable using the freestanding
1134011340 OS target. Here's an example of running Zig code compiled to WebAssembly with nodejs.</p>
11341 {#code_begin|lib|math#}
11341 {#code_begin|exe|math#}
1134211342 {#target_wasm#}
11343 {#link_mode_dynamic#}
11344 {#additonal_option|-rdynamic#}
11343 {#additonal_option|-fno-entry#}
11344 {#additonal_option|--export=add#}
1134511345extern fn print(i32) void;
1134611346
1134711347export fn add(a: i32, b: i32) void {