Skip to content

Commit 978b57d

Browse files
committed
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 dad0b07 commit 978b57d

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
@@ -626,6 +626,10 @@ added:
626626
- v13.3.0
627627
- v12.16.0
628628
changes:
629+
- version: REPLACEME
630+
pr-url: https://github.com/nodejs/node/pull/47286
631+
description: This option is no longer required as WASI is
632+
enabled by default, but can still be passed.
629633
- version: v13.6.0
630634
pr-url: https://github.com/nodejs/node/pull/30980
631635
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
@@ -194,7 +194,8 @@ Disable top-level await keyword support in REPL.
194194
Enable experimental ES module support in VM module.
195195
.
196196
.It Fl -experimental-wasi-unstable-preview1
197-
Enable experimental WebAssembly System Interface support.
197+
Enable experimental WebAssembly System Interface support. This
198+
flag is no longer required as WASI is enabled by default.
198199
.
199200
.It Fl -experimental-wasm-modules
200201
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
@@ -79,7 +79,6 @@ function prepareExecution(options) {
7979

8080
initializeSourceMapsHandlers();
8181
initializeDeprecations();
82-
initializeWASI();
8382

8483
require('internal/dns/utils').initializeDns();
8584

@@ -596,13 +595,6 @@ function readPolicyFromDisk() {
596595
}
597596
}
598597

599-
function initializeWASI() {
600-
const { BuiltinModule } = require('internal/bootstrap/loaders');
601-
const mod = BuiltinModule.map.get('wasi');
602-
mod.canBeRequiredByUsers =
603-
getOptionValue('--experimental-wasi-unstable-preview1');
604-
}
605-
606598
function initializeCJSLoader() {
607599
const { initializeCJS } = require('internal/modules/cjs/loader');
608600
initializeCJS();

src/node_options.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -447,10 +447,8 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
447447
kAllowedInEnvvar);
448448
AddOption("--experimental-worker", "", NoOp{}, kAllowedInEnvvar);
449449
AddOption("--experimental-report", "", NoOp{}, kAllowedInEnvvar);
450-
AddOption("--experimental-wasi-unstable-preview1",
451-
"experimental WASI support",
452-
&EnvironmentOptions::experimental_wasi,
453-
kAllowedInEnvvar);
450+
AddOption(
451+
"--experimental-wasi-unstable-preview1", "", NoOp{}, kAllowedInEnvvar);
454452
AddOption("--expose-internals", "", &EnvironmentOptions::expose_internals);
455453
AddOption("--frozen-intrinsics",
456454
"experimental frozen intrinsics support",

src/node_options.h

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

191191
bool syntax_check_only = false;
192192
bool has_eval_string = false;
193-
bool experimental_wasi = false;
194193
std::string eval_string;
195194
bool print_eval = false;
196195
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
], {

test/wasi/test-wasi-options-validation.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
'use strict';
22

3-
// Flags: --experimental-wasi-unstable-preview1
4-
53
require('../common');
64
const assert = require('assert');
75
const { WASI } = require('wasi');

test/wasi/test-wasi-require-flag.js

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

test/wasi/test-wasi-start-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-stdio.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 tmpdir = require('../common/tmpdir');

test/wasi/test-wasi-symlinks.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ if (process.argv[2] === 'wasi-child') {
6363
console.log('executing', options.test);
6464
const opts = { env: { ...process.env, NODE_DEBUG_NATIVE: 'wasi' } };
6565
const child = cp.spawnSync(process.execPath, [
66-
'--experimental-wasi-unstable-preview1',
6766
__filename,
6867
'wasi-child',
6968
options.test,

test/wasi/test-wasi-worker-terminate.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.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ if (process.argv[2] === 'wasi-child-default') {
8888

8989
const child = cp.spawnSync(process.execPath, [
9090
...args,
91-
'--experimental-wasi-unstable-preview1',
9291
__filename,
9392
'wasi-child-' + flavor,
9493
options.test,

0 commit comments

Comments
 (0)