Skip to content

Commit a01d120

Browse files
author
Alex Casalboni
committed
docs: add '--disable all' warning for standard library utilities that don't work without WASI interfaces such as stdio, random, and clocks
1 parent e0c92e4 commit a01d120

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

component-model/src/language-support/javascript.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ You should see output like the following:
106106
OK Successfully written add.wasm.
107107
```
108108

109+
> **WARNING:** By using `--disable all`, your component won't get access to any WASI interfaces that might be useful for debugging or logging. For example, you can't `console.log(...)` or `console.error(...)` without `stdio`; you can't use `Math.random()` without `random`; and you can't use `Date.now()` or `new Date()` without `clocks`. Please note that calls to `Math.random()` or `Data.now()` will return seemengly valid outputs, but without actual randomness or timestamp correctness.
110+
109111
[mdn-js-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
110112

111113
## Running the Component in the `example-host`

0 commit comments

Comments
 (0)