Skip to content

Commit 58afcc2

Browse files
mhdawsondanielleadams
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 <mdawson@devrus.com> PR-URL: #47286 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent b1bcdce commit 58afcc2

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
@@ -466,6 +466,10 @@ added:
466466
- v13.3.0
467467
- v12.16.0
468468
changes:
469+
- version: REPLACEME
470+
pr-url: https://github.com/nodejs/node/pull/47286
471+
description: This option is no longer required as WASI is
472+
enabled by default, but can still be passed.
469473
- version: v13.6.0
470474
pr-url: https://github.com/nodejs/node/pull/30980
471475
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
@@ -103,9 +103,6 @@ Use [wabt](https://github.com/WebAssembly/wabt) to compile `.wat` to `.wasm`
103103
$ wat2wasm demo.wat
104104
```
105105

106-
The `--experimental-wasi-unstable-preview1` CLI argument is needed for this
107-
example to run.
108-
109106
## Class: `WASI`
110107

111108
<!-- YAML

β€Ždoc/node.1β€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ Select extension resolution algorithm for ES Modules; either 'explicit' (default
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
@@ -70,7 +70,6 @@ function prepareExecution(options) {
7070
initializeReport();
7171
initializeSourceMapsHandlers();
7272
initializeDeprecations();
73-
initializeWASI();
7473
require('internal/dns/utils').initializeDns();
7574

7675
if (isMainThread) {
@@ -532,13 +531,6 @@ function readPolicyFromDisk() {
532531
}
533532
}
534533

535-
function initializeWASI() {
536-
const { BuiltinModule } = require('internal/bootstrap/loaders');
537-
const mod = BuiltinModule.map.get('wasi');
538-
mod.canBeRequiredByUsers =
539-
getOptionValue('--experimental-wasi-unstable-preview1');
540-
}
541-
542534
function initializeCJSLoader() {
543535
const CJSLoader = require('internal/modules/cjs/loader');
544536
if (!getEmbedderOptions().noGlobalSearchPaths) {

β€Žsrc/node_options.ccβ€Ž

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -428,10 +428,8 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
428428
kAllowedInEnvvar);
429429
AddOption("--experimental-worker", "", NoOp{}, kAllowedInEnvvar);
430430
AddOption("--experimental-report", "", NoOp{}, kAllowedInEnvvar);
431-
AddOption("--experimental-wasi-unstable-preview1",
432-
"experimental WASI support",
433-
&EnvironmentOptions::experimental_wasi,
434-
kAllowedInEnvvar);
431+
AddOption(
432+
"--experimental-wasi-unstable-preview1", "", NoOp{}, kAllowedInEnvvar);
435433
AddOption("--expose-internals", "", &EnvironmentOptions::expose_internals);
436434
AddOption("--frozen-intrinsics",
437435
"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)