@grame/faustwasm 0.15.0 → 0.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -3
- package/dist/cjs-bundle/index.js +3 -3
- package/dist/cjs-bundle/index.js.map +2 -2
- package/dist/esm-bundle/index.js +3 -3
- package/dist/esm-bundle/index.js.map +2 -2
- package/libfaust-wasm/libfaust-wasm.data +0 -0
- package/libfaust-wasm/libfaust-wasm.js +1 -1
- package/libfaust-wasm/libfaust-wasm.wasm +0 -0
- package/package.json +1 -1
- package/scripts/faust2wasm.js +35 -17
- package/src/faust2wasmFiles.js +86 -0
package/README.md
CHANGED
|
@@ -73,6 +73,22 @@ node scripts/faust2wasm.js test/poly.dsp test/out -poly
|
|
|
73
73
|
```
|
|
74
74
|
will create a set of files: `index.js`, `dsp-module.wasm`, `dsp-meta.json`, `index.html` (and possibly `effect-module.wasm`, `effect-meta.json`) in the `out` folder.
|
|
75
75
|
|
|
76
|
+
##### Local include files and `-I`
|
|
77
|
+
|
|
78
|
+
The CLI runs the Faust compiler inside a WebAssembly in-memory filesystem, so it cannot read your host filesystem directly. To make local `import("something.lib")` work:
|
|
79
|
+
|
|
80
|
+
- The directory that contains the input `.dsp` is automatically copied into the in-memory FS and added to the compiler include path.
|
|
81
|
+
- Any `-I <dir>` (or `-Idir`) you pass is mirrored into the in-memory FS and added to the include path.
|
|
82
|
+
- Only `.dsp` and `.lib` files are mirrored.
|
|
83
|
+
|
|
84
|
+
This means you can run the CLI from any working directory as long as your local includes live next to the DSP or are listed with `-I`.
|
|
85
|
+
|
|
86
|
+
Example:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
node scripts/faust2wasm.js -I test/includes test/something.dsp test/out
|
|
90
|
+
```
|
|
91
|
+
|
|
76
92
|
#### Creating a Progressive Web Application (PWA) of a Faust DSP
|
|
77
93
|
|
|
78
94
|
You can create a standalone Progressive Web Application using the command line:
|
|
@@ -365,6 +381,3 @@ Html pages embedding the Faust compiler must be served using https, unless using
|
|
|
365
381
|
|
|
366
382
|
----
|
|
367
383
|
<a href="http://faust.grame.fr"><img src=https://faust.grame.fr/community/logos/img/LOGO_FAUST_COMPLET_ORANGE.png width=200 /></a>
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|