summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsher Gomez <ashersaupingomez@gmail.com>2024-09-12 22:27:16 +1000
committerGitHub <noreply@github.com>2024-09-12 12:27:16 +0000
commit9e8f84214f88ae725f9a028f615b19546b9d789f (patch)
tree5a1ef949e6fd541ecc5bcf16e3bc61fbd5b6b6e7
parentb0265eaf8f1d42ec983c2fef0d78435239442ddc (diff)
refactor: cleanup unstable checks for WebGPU, FFI and FS APIs (#25586)
Continuation of work in #25488. --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
-rw-r--r--cli/args/mod.rs12
-rw-r--r--cli/tsc/99_main_compiler.js6
-rw-r--r--ext/ffi/call.rs3
-rw-r--r--ext/ffi/callback.rs2
-rw-r--r--ext/ffi/dlfcn.rs2
-rw-r--r--ext/ffi/lib.rs9
-rw-r--r--ext/ffi/repr.rs37
-rw-r--r--ext/fs/lib.rs10
-rw-r--r--ext/fs/ops.rs2
-rw-r--r--ext/webgpu/lib.rs7
-rw-r--r--runtime/js/90_deno_ns.js18
-rw-r--r--runtime/js/98_global_scope_shared.js181
12 files changed, 152 insertions, 137 deletions
diff --git a/cli/args/mod.rs b/cli/args/mod.rs
index 203ceec50..7d885295e 100644
--- a/cli/args/mod.rs
+++ b/cli/args/mod.rs
@@ -1596,18 +1596,6 @@ impl CliOptions {
}
});
- // TODO(2.0): remove this code and enable these features in `99_main.js` by default.
- let future_features = [
- 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(),
- ];
- future_features.iter().for_each(|future_feature| {
- if !from_config_file.contains(future_feature) {
- from_config_file.push(future_feature.to_string());
- }
- });
-
if !from_config_file.is_empty() {
// collect unstable granular flags
let mut all_valid_unstable_flags: Vec<&str> =
diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js
index 03729b892..42bf1055f 100644
--- a/cli/tsc/99_main_compiler.js
+++ b/cli/tsc/99_main_compiler.js
@@ -36,17 +36,11 @@ delete Object.prototype.__proto__;
"Kv",
"KvListIterator",
"KvU64",
- "UnsafeCallback",
- "UnsafePointer",
- "UnsafePointerView",
- "UnsafeFnPointer",
"UnixConnectOptions",
"UnixListenOptions",
- "dlopen",
"listen",
"listenDatagram",
"openKv",
- "umask",
]);
const unstableMsgSuggestion =
"If not, try changing the 'lib' compiler option to include 'deno.unstable' " +
diff --git a/ext/ffi/call.rs b/ext/ffi/call.rs
index 916597293..380fc03a1 100644
--- a/ext/ffi/call.rs
+++ b/ext/ffi/call.rs
@@ -1,7 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
use crate::callback::PtrSymbol;
-use crate::check_unstable;
use crate::dlfcn::DynamicLibraryResource;
use crate::ir::*;
use crate::symbol::NativeType;
@@ -285,7 +284,6 @@ pub fn op_ffi_call_ptr_nonblocking<FP>(
where
FP: FfiPermissions + 'static,
{
- check_unstable(&state.borrow(), "Deno.UnsafeFnPointer#call");
{
let mut state = state.borrow_mut();
let permissions = state.borrow_mut::<FP>();
@@ -383,7 +381,6 @@ pub fn op_ffi_call_ptr<FP>(
where
FP: FfiPermissions + 'static,
{
- check_unstable(&state.borrow(), "Deno.UnsafeFnPointer#call");
{
let mut state = state.borrow_mut();
let permissions = state.borrow_mut::<FP>();
diff --git a/ext/ffi/callback.rs b/ext/ffi/callback.rs
index 281208322..7d0114131 100644
--- a/ext/ffi/callback.rs
+++ b/ext/ffi/callback.rs
@@ -1,6 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
-use crate::check_unstable;
use crate::symbol::NativeType;
use crate::FfiPermissions;
use crate::ForeignFunction;
@@ -557,7 +556,6 @@ pub fn op_ffi_unsafe_callback_create<FP, 'scope>(
where
FP: FfiPermissions + 'static,
{
- check_unstable(state, "Deno.UnsafeCallback");
let permissions = state.borrow_mut::<FP>();
permissions.check_partial(None)?;
diff --git a/ext/ffi/dlfcn.rs b/ext/ffi/dlfcn.rs
index 261a62cd3..2bae5d223 100644
--- a/ext/ffi/dlfcn.rs
+++ b/ext/ffi/dlfcn.rs
@@ -1,6 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
-use crate::check_unstable;
use crate::ir::out_buffer_as_ptr;
use crate::symbol::NativeType;
use crate::symbol::Symbol;
@@ -124,7 +123,6 @@ where
{
let path = args.path;
- check_unstable(state, "Deno.dlopen");
let permissions = state.borrow_mut::<FP>();
permissions.check_partial(Some(&PathBuf::from(&path)))?;
diff --git a/ext/ffi/lib.rs b/ext/ffi/lib.rs
index 26b06d98f..59d241c5a 100644
--- a/ext/ffi/lib.rs
+++ b/ext/ffi/lib.rs
@@ -1,7 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
use deno_core::error::AnyError;
-use deno_core::OpState;
use std::mem::size_of;
use std::os::raw::c_char;
@@ -41,14 +40,6 @@ const _: () = {
pub const UNSTABLE_FEATURE_NAME: &str = "ffi";
-fn check_unstable(state: &OpState, api_name: &str) {
- // TODO(bartlomieju): replace with `state.feature_checker.check_or_exit`
- // once we phase out `check_or_exit_with_legacy_fallback`
- state
- .feature_checker
- .check_or_exit_with_legacy_fallback(UNSTABLE_FEATURE_NAME, api_name)
-}
-
pub trait FfiPermissions {
fn check_partial(&mut self, path: Option<&Path>) -> Result<(), AnyError>;
}
diff --git a/ext/ffi/repr.rs b/ext/ffi/repr.rs
index c3656f0fe..f56537475 100644
--- a/ext/ffi/repr.rs
+++ b/ext/ffi/repr.rs
@@ -1,6 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
-use crate::check_unstable;
use crate::FfiPermissions;
use deno_core::error::range_error;
use deno_core::error::type_error;
@@ -21,7 +20,6 @@ pub fn op_ffi_ptr_create<FP>(
where
FP: FfiPermissions + 'static,
{
- check_unstable(state, "Deno.UnsafePointer#create");
let permissions = state.borrow_mut::<FP>();
permissions.check_partial(None)?;
@@ -37,7 +35,6 @@ pub fn op_ffi_ptr_equals<FP>(
where
FP: FfiPermissions + 'static,
{
- check_unstable(state, "Deno.UnsafePointer#equals");
let permissions = state.borrow_mut::<FP>();
permissions.check_partial(None)?;
@@ -52,7 +49,6 @@ pub fn op_ffi_ptr_of<FP>(
where
FP: FfiPermissions + 'static,
{
- check_unstable(state, "Deno.UnsafePointer#of");
let permissions = state.borrow_mut::<FP>();
permissions.check_partial(None)?;
@@ -67,7 +63,6 @@ pub fn op_ffi_ptr_of_exact<FP>(
where
FP: FfiPermissions + 'static,
{
- check_unstable(state, "Deno.UnsafePointer#of");
let permissions = state.borrow_mut::<FP>();
permissions.check_partial(None)?;
@@ -89,7 +84,6 @@ pub fn op_ffi_ptr_offset<FP>(
where
FP: FfiPermissions + 'static,
{
- check_unstable(state, "Deno.UnsafePointer#offset");
let permissions = state.borrow_mut::<FP>();
permissions.check_partial(None)?;
@@ -120,7 +114,6 @@ pub fn op_ffi_ptr_value<FP>(
where
FP: FfiPermissions + 'static,
{
- check_unstable(state, "Deno.UnsafePointer#value");
let permissions = state.borrow_mut::<FP>();
permissions.check_partial(None)?;
@@ -138,8 +131,6 @@ pub fn op_ffi_get_buf<FP, 'scope>(
where
FP: FfiPermissions + 'static,
{
- check_unstable(state, "Deno.UnsafePointerView#getArrayBuffer");
-
let permissions = state.borrow_mut::<FP>();
permissions.check_partial(None)?;
@@ -172,8 +163,6 @@ pub fn op_ffi_buf_copy_into<FP>(
where
FP: FfiPermissions + 'static,
{
- check_unstable(state, "Deno.UnsafePointerView#copyInto");
-
let permissions = state.borrow_mut::<FP>();
permissions.check_partial(None)?;
@@ -205,8 +194,6 @@ pub fn op_ffi_cstr_read<FP, 'scope>(
where
FP: FfiPermissions + 'static,
{
- check_unstable(state, "Deno.UnsafePointerView#getCString");
-
let permissions = state.borrow_mut::<FP>();
permissions.check_partial(None)?;
@@ -233,8 +220,6 @@ pub fn op_ffi_read_bool<FP>(
where
FP: FfiPermissions + 'static,
{
- check_unstable(state, "Deno.UnsafePointerView#getBool");
-
let permissions = state.borrow_mut::<FP>();
permissions.check_partial(None)?;
@@ -255,8 +240,6 @@ pub fn op_ffi_read_u8<FP>(
where
FP: FfiPermissions + 'static,
{
- check_unstable(state, "Deno.UnsafePointerView#getUint8");
-
let permissions = state.borrow_mut::<FP>();
permissions.check_partial(None)?;
@@ -279,8 +262,6 @@ pub fn op_ffi_read_i8<FP>(
where
FP: FfiPermissions + 'static,
{
- check_unstable(state, "Deno.UnsafePointerView#getInt8");
-
let permissions = state.borrow_mut::<FP>();
permissions.check_partial(None)?;
@@ -303,8 +284,6 @@ pub fn op_ffi_read_u16<FP>(
where
FP: FfiPermissions + 'static,
{
- check_unstable(state, "Deno.UnsafePointerView#getUint16");
-
let permissions = state.borrow_mut::<FP>();
permissions.check_partial(None)?;
@@ -327,8 +306,6 @@ pub fn op_ffi_read_i16<FP>(
where
FP: FfiPermissions + 'static,
{
- check_unstable(state, "Deno.UnsafePointerView#getInt16");
-
let permissions = state.borrow_mut::<FP>();
permissions.check_partial(None)?;
@@ -351,8 +328,6 @@ pub fn op_ffi_read_u32<FP>(
where
FP: FfiPermissions + 'static,
{
- check_unstable(state, "Deno.UnsafePointerView#getUint32");
-
let permissions = state.borrow_mut::<FP>();
permissions.check_partial(None)?;
@@ -373,8 +348,6 @@ pub fn op_ffi_read_i32<FP>(
where
FP: FfiPermissions + 'static,
{
- check_unstable(state, "Deno.UnsafePointerView#getInt32");
-
let permissions = state.borrow_mut::<FP>();
permissions.check_partial(None)?;
@@ -398,8 +371,6 @@ pub fn op_ffi_read_u64<FP>(
where
FP: FfiPermissions + 'static,
{
- check_unstable(state, "Deno.UnsafePointerView#getBigUint64");
-
let permissions = state.borrow_mut::<FP>();
permissions.check_partial(None)?;
@@ -426,8 +397,6 @@ pub fn op_ffi_read_i64<FP>(
where
FP: FfiPermissions + 'static,
{
- check_unstable(state, "Deno.UnsafePointerView#getBigInt64");
-
let permissions = state.borrow_mut::<FP>();
permissions.check_partial(None)?;
@@ -451,8 +420,6 @@ pub fn op_ffi_read_f32<FP>(
where
FP: FfiPermissions + 'static,
{
- check_unstable(state, "Deno.UnsafePointerView#getFloat32");
-
let permissions = state.borrow_mut::<FP>();
permissions.check_partial(None)?;
@@ -473,8 +440,6 @@ pub fn op_ffi_read_f64<FP>(
where
FP: FfiPermissions + 'static,
{
- check_unstable(state, "Deno.UnsafePointerView#getFloat64");
-
let permissions = state.borrow_mut::<FP>();
permissions.check_partial(None)?;
@@ -495,8 +460,6 @@ pub fn op_ffi_read_ptr<FP>(
where
FP: FfiPermissions + 'static,
{
- check_unstable(state, "Deno.UnsafePointerView#getPointer");
-
let permissions = state.borrow_mut::<FP>();
permissions.check_partial(None)?;
diff --git a/ext/fs/lib.rs b/ext/fs/lib.rs
index f4815fd29..a6f273323 100644
--- a/ext/fs/lib.rs
+++ b/ext/fs/lib.rs
@@ -21,7 +21,6 @@ pub use crate::sync::MaybeSync;
use crate::ops::*;
use deno_core::error::AnyError;
-use deno_core::OpState;
use deno_io::fs::FsError;
use std::borrow::Cow;
use std::path::Path;
@@ -167,15 +166,6 @@ impl FsPermissions for deno_permissions::PermissionsContainer {
pub const UNSTABLE_FEATURE_NAME: &str = "fs";
-/// Helper for checking unstable features. Used for sync ops.
-fn check_unstable(state: &OpState, api_name: &str) {
- // TODO(bartlomieju): replace with `state.feature_checker.check_or_exit`
- // once we phase out `check_or_exit_with_legacy_fallback`
- state
- .feature_checker
- .check_or_exit_with_legacy_fallback(UNSTABLE_FEATURE_NAME, api_name);
-}
-
deno_core::extension!(deno_fs,
deps = [ deno_web ],
parameters = [P: FsPermissions],
diff --git a/ext/fs/ops.rs b/ext/fs/ops.rs
index 8af2f0045..f25cd944d 100644
--- a/ext/fs/ops.rs
+++ b/ext/fs/ops.rs
@@ -26,7 +26,6 @@ use rand::thread_rng;
use rand::Rng;
use serde::Serialize;
-use crate::check_unstable;
use crate::interface::AccessCheckFn;
use crate::interface::FileSystemRc;
use crate::interface::FsDirEntry;
@@ -121,7 +120,6 @@ pub fn op_fs_umask(
) -> Result<u32, AnyError>
where
{
- check_unstable(state, "Deno.umask");
state.borrow::<FileSystemRc>().umask(mask).context("umask")
}
diff --git a/ext/webgpu/lib.rs b/ext/webgpu/lib.rs
index df01c5ff9..df2ab323a 100644
--- a/ext/webgpu/lib.rs
+++ b/ext/webgpu/lib.rs
@@ -403,13 +403,6 @@ pub fn op_webgpu_request_adapter(
) -> Result<GpuAdapterResOrErr, AnyError> {
let mut state = state.borrow_mut();
- // TODO(bartlomieju): replace with `state.feature_checker.check_or_exit`
- // once we phase out `check_or_exit_with_legacy_fallback`
- state.feature_checker.check_or_exit_with_legacy_fallback(
- UNSTABLE_FEATURE_NAME,
- "navigator.gpu.requestAdapter",
- );
-
let backends = std::env::var("DENO_WEBGPU_BACKEND").map_or_else(
|_| wgpu_types::Backends::all(),
|s| wgpu_core::instance::parse_backends_from_comma_list(&s),
diff --git a/runtime/js/90_deno_ns.js b/runtime/js/90_deno_ns.js
index 51b00fa02..35378da4d 100644
--- a/runtime/js/90_deno_ns.js
+++ b/runtime/js/90_deno_ns.js
@@ -126,6 +126,12 @@ const denoNs = {
uid: os.uid,
Command: process.Command,
ChildProcess: process.ChildProcess,
+ dlopen: ffi.dlopen,
+ UnsafeCallback: ffi.UnsafeCallback,
+ UnsafePointer: ffi.UnsafePointer,
+ UnsafePointerView: ffi.UnsafePointerView,
+ UnsafeFnPointer: ffi.UnsafeFnPointer,
+ umask: fs.umask,
httpClient: httpClient.httpClient,
createHttpClient: httpClient.createHttpClient,
};
@@ -154,17 +160,9 @@ denoNsUnstableById[unstableIds.cron] = {
cron: cron.cron,
};
-denoNsUnstableById[unstableIds.ffi] = {
- dlopen: ffi.dlopen,
- UnsafeCallback: ffi.UnsafeCallback,
- UnsafePointer: ffi.UnsafePointer,
- UnsafePointerView: ffi.UnsafePointerView,
- UnsafeFnPointer: ffi.UnsafeFnPointer,
-};
+denoNsUnstableById[unstableIds.ffi] = {};
-denoNsUnstableById[unstableIds.fs] = {
- umask: fs.umask,
-};
+denoNsUnstableById[unstableIds.fs] = {};
denoNsUnstableById[unstableIds.http] = {
HttpClient: httpClient.HttpClient,
diff --git a/runtime/js/98_global_scope_shared.js b/runtime/js/98_global_scope_shared.js
index 41df35c60..7a2723899 100644
--- a/runtime/js/98_global_scope_shared.js
+++ b/runtime/js/98_global_scope_shared.js
@@ -145,6 +145,148 @@ const windowOrWorkerGlobalScope = {
structuredClone: core.propWritable(messagePort.structuredClone),
// Branding as a WebIDL object
[webidl.brand]: core.propNonEnumerable(webidl.brand),
+ GPU: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPU, loadWebGPU),
+ GPUAdapter: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUAdapter,
+ loadWebGPU,
+ ),
+ GPUAdapterInfo: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUAdapterInfo,
+ loadWebGPU,
+ ),
+ GPUBuffer: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUBuffer,
+ loadWebGPU,
+ ),
+ GPUBufferUsage: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUBufferUsage,
+ loadWebGPU,
+ ),
+ GPUCanvasContext: core.propNonEnumerable(webgpuSurface.GPUCanvasContext),
+ GPUColorWrite: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUColorWrite,
+ loadWebGPU,
+ ),
+ GPUCommandBuffer: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUCommandBuffer,
+ loadWebGPU,
+ ),
+ GPUCommandEncoder: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUCommandEncoder,
+ loadWebGPU,
+ ),
+ GPUComputePassEncoder: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUComputePassEncoder,
+ loadWebGPU,
+ ),
+ GPUComputePipeline: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUComputePipeline,
+ loadWebGPU,
+ ),
+ GPUDevice: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUDevice,
+ loadWebGPU,
+ ),
+ GPUDeviceLostInfo: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUDeviceLostInfo,
+ loadWebGPU,
+ ),
+ GPUError: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUError,
+ loadWebGPU,
+ ),
+ GPUBindGroup: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUBindGroup,
+ loadWebGPU,
+ ),
+ GPUBindGroupLayout: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUBindGroupLayout,
+ loadWebGPU,
+ ),
+ GPUInternalError: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUInternalError,
+ loadWebGPU,
+ ),
+ GPUPipelineError: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUPipelineError,
+ loadWebGPU,
+ ),
+ GPUUncapturedErrorEvent: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUUncapturedErrorEvent,
+ loadWebGPU,
+ ),
+ GPUPipelineLayout: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUPipelineLayout,
+ loadWebGPU,
+ ),
+ GPUQueue: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUQueue,
+ loadWebGPU,
+ ),
+ GPUQuerySet: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUQuerySet,
+ loadWebGPU,
+ ),
+ GPUMapMode: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUMapMode,
+ loadWebGPU,
+ ),
+ GPUOutOfMemoryError: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUOutOfMemoryError,
+ loadWebGPU,
+ ),
+ GPURenderBundle: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPURenderBundle,
+ loadWebGPU,
+ ),
+ GPURenderBundleEncoder: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPURenderBundleEncoder,
+ loadWebGPU,
+ ),
+ GPURenderPassEncoder: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPURenderPassEncoder,
+ loadWebGPU,
+ ),
+ GPURenderPipeline: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPURenderPipeline,
+ loadWebGPU,
+ ),
+ GPUSampler: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUSampler,
+ loadWebGPU,
+ ),
+ GPUShaderModule: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUShaderModule,
+ loadWebGPU,
+ ),
+ GPUShaderStage: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUShaderStage,
+ loadWebGPU,
+ ),
+ GPUSupportedFeatures: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUSupportedFeatures,
+ loadWebGPU,
+ ),
+ GPUSupportedLimits: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUSupportedLimits,
+ loadWebGPU,
+ ),
+ GPUTexture: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUTexture,
+ loadWebGPU,
+ ),
+ GPUTextureView: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUTextureView,
+ loadWebGPU,
+ ),
+ GPUTextureUsage: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUTextureUsage,
+ loadWebGPU,
+ ),
+ GPUValidationError: core.propNonEnumerableLazyLoaded(
+ (webgpu) => webgpu.GPUValidationError,
+ loadWebGPU,
+ ),
};
const unstableForWindowOrWorkerGlobalScope = { __proto__: null };
@@ -155,42 +297,7 @@ unstableForWindowOrWorkerGlobalScope[unstableIds.net] = {
WebSocketStream: core.propNonEnumerable(webSocketStream.WebSocketStream),
WebSocketError: core.propNonEnumerable(webSocketStream.WebSocketError),
};
-// deno-fmt-ignore
-unstableForWindowOrWorkerGlobalScope[unstableIds.webgpu] = {
- GPU: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPU, loadWebGPU),
- GPUAdapter: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUAdapter, loadWebGPU),
- GPUAdapterInfo: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUAdapterInfo, loadWebGPU),
- GPUSupportedLimits: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUSupportedLimits, loadWebGPU),
- GPUSupportedFeatures: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUSupportedFeatures, loadWebGPU),
- GPUDeviceLostInfo: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUDeviceLostInfo, loadWebGPU),
- GPUDevice: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUDevice, loadWebGPU),
- GPUQueue: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUQueue, loadWebGPU),
- GPUBuffer: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUBuffer, loadWebGPU),
- GPUBufferUsage: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUBufferUsage, loadWebGPU),
- GPUMapMode: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUMapMode, loadWebGPU),
- GPUTextureUsage: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUTextureUsage, loadWebGPU),
- GPUTexture: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUTexture, loadWebGPU),
- GPUTextureView: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUTextureView, loadWebGPU),
- GPUSampler: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUSampler, loadWebGPU),
- GPUBindGroupLayout: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUBindGroupLayout, loadWebGPU),
- GPUPipelineLayout: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUPipelineLayout, loadWebGPU),
- GPUBindGroup: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUBindGroup, loadWebGPU),
- GPUShaderModule: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUShaderModule, loadWebGPU),
- GPUShaderStage: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUShaderStage, loadWebGPU),
- GPUComputePipeline: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUComputePipeline, loadWebGPU),
- GPURenderPipeline: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPURenderPipeline, loadWebGPU),
- GPUColorWrite: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUColorWrite, loadWebGPU),
- GPUCommandEncoder: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUCommandEncoder, loadWebGPU),
- GPURenderPassEncoder: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPURenderPassEncoder, loadWebGPU),
- GPUComputePassEncoder: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUComputePassEncoder, loadWebGPU),
- GPUCommandBuffer: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUCommandBuffer, loadWebGPU),
- GPURenderBundleEncoder: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPURenderBundleEncoder, loadWebGPU),
- GPURenderBundle: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPURenderBundle, loadWebGPU),
- GPUQuerySet: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUQuerySet, loadWebGPU),
- GPUError: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUError, loadWebGPU),
- GPUValidationError: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUValidationError, loadWebGPU),
- GPUOutOfMemoryError: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUOutOfMemoryError, loadWebGPU),
- GPUCanvasContext: core.propNonEnumerable(webgpuSurface.GPUCanvasContext),
-};
+
+unstableForWindowOrWorkerGlobalScope[unstableIds.webgpu] = {};
export { unstableForWindowOrWorkerGlobalScope, windowOrWorkerGlobalScope };