FUTHARK-WASM(1)

πŸ“¦
version 0.25.32 Β· 5 versions
, in ubuntu resolute, ubuntu stonking

✨ FUTHARK-WASM ✨

okay bestie, welcome to futhark-wasm πŸ’– β€” this is the page from the Futhark manual that teaches you how to compile Futhark to WebAssembly. no cap, it's giving "put your functional array code on the internet" energy πŸ¦‹


πŸŽ€ NAME πŸŽ€

futhark-wasm β€” compile Futhark to WebAssembly 🌈


🌸 SYNOPSIS 🌸

futhark wasm [options...] <program.fut>

πŸ’… DESCRIPTION πŸ’…

so here's the tea β˜•: futhark wasm translates a Futhark program to sequential WebAssembly code. the way it does this is honestly kind of a two-step queen move β€” first it generates C, exactly like futhark c does, and then it hands that C over to Emscripten (emcc) to do the wasm thing ✨

the result is a .js file, which means your compiled code can be invoked from JavaScript. iconic. 🫢

oh and the executables implement the Futhark server protocol, so you can literally run them with Node.js. main character behaviour, fr fr πŸ˜­πŸ‘‘


✨ OPTIONS ✨

it accepts the same options as futhark-c β€” go check that page, bestie, it's the blueprint πŸ’œ


🌈 ENVIRONMENT VARIABLES 🌈

  • CFLAGS β€” a space-separated list of options passed to emcc. if it's unset, it defaults to -O3 -std=c99. lowkey a solid default ngl ✨
  • EMCFLAGS β€” a space-separated list of options passed to emcc. that's it, that's the vibe πŸ’…

πŸ‘‘ EXECUTABLE OPTIONS πŸ‘‘

these are the options accepted by the executables that futhark wasm generates for you πŸŽ€ β€” they're the ones you get after the compile, so don't go looking for them in the compiler itself, bestie πŸ™ˆ

  • -h, --help β€” prints help text to standard output and then exits. classic, we love a polite exit 🫢
  • -D, --debugging β€” performs possibly expensive internal correctness checks plus verbose logging. heads up: this implies -L, so you're getting the logging whether you asked or not 😭
  • -L, --log β€” prints various low-overhead logging info to stderr while it's running. lowkey useful, highkey chatty πŸ”₯

πŸ¦‹ SEE ALSO πŸ¦‹

  • futhark-c
  • futhark-wasm-multicore

2013-2020, DIKU, University of Copenhagen πŸ’œ


and that's the whole page, bestie!! this was Futhark 0.25.32, dated Mar 11, 2026, from the Futhark manual πŸŽ€ go forth and compile some wasm, you absolute icon πŸ‘‘βœ¨πŸ’–

πŸ“¦ where this page comes from