File: futhark-wasm.rst

package info (click to toggle)
haskell-futhark 0.25.32-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 18,236 kB
  • sloc: haskell: 100,484; ansic: 12,100; python: 3,440; yacc: 785; sh: 561; javascript: 558; lisp: 399; makefile: 277
file content (64 lines) | stat: -rw-r--r-- 1,247 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
.. role:: ref(emphasis)

.. _futhark-wasm(1):

============
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``).  This produces a ``.js`` file that allows
the compiled code to be invoked from JavaScript.  Executables
implement the Futhark server protocol and can be run with Node.js.

OPTIONS
=======

Accepts the same options as :ref:`futhark-c(1)`.

ENVIRONMENT VARIABLES
=====================

``CFLAGS``

  Space-separated list of options passed to ``emcc``.  Defaults
  to ``-O3 -std=c99`` if 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.


SEE ALSO
========

:ref:`futhark-c(1)`, :ref:`futhark-wasm-multicore(1)`