From adbd564758d0f596cee5f23054b24571328bb5d6 Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Tue, 28 May 2024 21:37:43 +1000 Subject: [PATCH] FUTURE(ext/ffi,ext/webgpu): stabilize FFI and WebGPU APIs (#24011) Closes #23906 --- cli/args/mod.rs | 2 ++ tests/specs/future/unstable_flags/main.js | 2 ++ tests/specs/future/unstable_flags/main.out | 2 ++ 3 files changed, 6 insertions(+) diff --git a/cli/args/mod.rs b/cli/args/mod.rs index cd53884597..c9101f5909 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -1757,7 +1757,9 @@ impl CliOptions { if *DENO_FUTURE { from_config_file.extend_from_slice(&[ + deno_runtime::deno_ffi::UNSTABLE_FEATURE_NAME.to_string(), deno_runtime::deno_fs::UNSTABLE_FEATURE_NAME.to_string(), + deno_runtime::deno_webgpu::UNSTABLE_FEATURE_NAME.to_string(), ]); } diff --git a/tests/specs/future/unstable_flags/main.js b/tests/specs/future/unstable_flags/main.js index 0d86d0d09c..51af892f6b 100644 --- a/tests/specs/future/unstable_flags/main.js +++ b/tests/specs/future/unstable_flags/main.js @@ -1,3 +1,5 @@ +console.log(typeof await navigator.gpu.requestAdapter() === "object"); // Throws without `--unstable-gpu` +console.log(typeof Deno.dlopen === "function"); // Undefined without `--unstable-ffi` console.log( // Undefined without `--unstable-fs` Deno.build.os === "windows" ? true : typeof Deno.umask === "function", diff --git a/tests/specs/future/unstable_flags/main.out b/tests/specs/future/unstable_flags/main.out index 27ba77ddaf..b979d62f4f 100644 --- a/tests/specs/future/unstable_flags/main.out +++ b/tests/specs/future/unstable_flags/main.out @@ -1 +1,3 @@ true +true +true