futhark-wasm¶
SYNOPSIS¶
futhark wasm [options…] <program.fut>
DESCRIPTION¶
futhark wasm translates a Futhark program to sequential
WebAssembly code by first generating C as futhark c, and then
using Emscripten (emcc). For a program prog.fut, this
produces an ES module prog.mjs, along with the WebAssembly module
prog.wasm. With --library, the ES module exports the API
described in JavaScript API Reference. Otherwise, prog is an executable
that runs the ES module with Node.js, and implements the Futhark
server protocol.
OPTIONS¶
Accepts the same options as futhark-c.
ENVIRONMENT VARIABLES¶
CFLAGS
Space-separated list of options passed to
emcc. Defaults to-O3 -msimd128if unset.
EMCFLAGS
Space-separated list of options passed to
emcc.
EXECUTABLE OPTIONS¶
The following options are accepted by executables generated by
futhark wasm.
- -h, --help
Print help text to standard output and exit.
- -D, --debugging
Perform possibly expensive internal correctness checks and verbose logging. Implies
-L.- -L, --log
Print various low-overhead logging information to stderr while running.
- -P, --profile
Enable the collection of profiling information.
- --param=ASSIGNMENT
Set a tuning parameter to the given value.
ASSIGNMENTmust be of the formNAME=INT.- --print-params
Print all tuning parameters that can be set with
--paramor--tuning.- --tuning=FILE
Read size=value assignments from the given file.
- --cache-file=FILE
Accepted for compatibility with other backends, but has no effect.