Skip to content

Commit 34ba736

Browse files
mhdawsonRafaelGSS
authored andcommitted
wasi: no longer require flag to enable wasi
- no longer require flag to enable experimental wasi feature - wasi is still documented as experimental Signed-off-by: Michael Dawson <[email protected]> PR-URL: #47286 Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 80fe448 commit 34ba736

17 files changed

+8
-84
lines changed

β€Ždoc/api/cli.mdβ€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,10 @@ added:
460460
- v13.3.0
461461
- v12.16.0
462462
changes:
463+
- version: REPLACEME
464+
pr-url: https://github.com/nodejs/node/pull/47286
465+
description: This option is no longer required as WASI is
466+
enabled by default, but can still be passed.
463467
- version: v13.6.0
464468
pr-url: https://github.com/nodejs/node/pull/30980
465469
description: changed from `--experimental-wasi-unstable-preview0` to

β€Ždoc/api/wasi.mdβ€Ž

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,6 @@ Use [wabt](https://github.com/WebAssembly/wabt) to compile `.wat` to `.wasm`
9797
$ wat2wasm demo.wat
9898
```
9999

100-
The `--experimental-wasi-unstable-preview1` CLI argument is needed for this
101-
example to run.
102-
103100
## Class: `WASI`
104101

105102
<!-- YAML

β€Ždoc/node.1β€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ Disable top-level await keyword support in REPL.
179179
Enable experimental ES module support in VM module.
180180
.
181181
.It Fl -experimental-wasi-unstable-preview1
182-
Enable experimental WebAssembly System Interface support.
182+
Enable experimental WebAssembly System Interface support. This
183+
flag is no longer required as WASI is enabled by default.
183184
.
184185
.It Fl -experimental-wasm-modules
185186
Enable experimental WebAssembly module support.

β€Žlib/internal/process/pre_execution.jsβ€Ž

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ function prepareExecution(options) {
7373
initializeReport();
7474
initializeSourceMapsHandlers();
7575
initializeDeprecations();
76-
initializeWASI();
7776

7877
require('internal/dns/utils').initializeDns();
7978

@@ -548,13 +547,6 @@ function readPolicyFromDisk() {
548547
}
549548
}
550549

551-
function initializeWASI() {
552-
const { BuiltinModule } = require('internal/bootstrap/loaders');
553-
const mod = BuiltinModule.map.get('wasi');
554-
mod.canBeRequiredByUsers =
555-
getOptionValue('--experimental-wasi-unstable-preview1');
556-
}
557-
558550
function initializeCJSLoader() {
559551
const { initializeCJS } = require('internal/modules/cjs/loader');
560552
initializeCJS();

β€Žsrc/node_options.ccβ€Ž

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,10 +426,8 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
426426
kAllowedInEnvvar);
427427
AddOption("--experimental-worker", "", NoOp{}, kAllowedInEnvvar);
428428
AddOption("--experimental-report", "", NoOp{}, kAllowedInEnvvar);
429-
AddOption("--experimental-wasi-unstable-preview1",
430-
"experimental WASI support",
431-
&EnvironmentOptions::experimental_wasi,
432-
kAllowedInEnvvar);
429+
AddOption(
430+
"--experimental-wasi-unstable-preview1", "", NoOp{}, kAllowedInEnvvar);
433431
AddOption("--expose-internals", "", &EnvironmentOptions::expose_internals);
434432
AddOption("--frozen-intrinsics",
435433
"experimental frozen intrinsics support",

β€Žsrc/node_options.hβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ class EnvironmentOptions : public Options {
185185

186186
bool syntax_check_only = false;
187187
bool has_eval_string = false;
188-
bool experimental_wasi = false;
189188
std::string eval_string;
190189
bool print_eval = false;
191190
bool force_repl = false;

β€Žtest/parallel/test-repl-built-in-modules.jsβ€Ž

Lines changed: 0 additions & 48 deletions
This file was deleted.

β€Žtest/wasi/test-return-on-exit.jsβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Flags: --experimental-wasi-unstable-preview1
21
'use strict';
32
const common = require('../common');
43
const assert = require('assert');

β€Žtest/wasi/test-wasi-initialize-validation.jsβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Flags: --experimental-wasi-unstable-preview1
21
'use strict';
32

43
const common = require('../common');

β€Žtest/wasi/test-wasi-not-started.jsβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ if (process.argv[2] === 'wasi-child') {
2828
const cp = require('child_process');
2929

3030
const child = cp.spawnSync(process.execPath, [
31-
'--experimental-wasi-unstable-preview1',
3231
__filename,
3332
'wasi-child',
3433
], {

0 commit comments

Comments
Β (0)