summaryrefslogtreecommitdiff
path: root/ext/webgpu/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/webgpu/lib.rs')
-rw-r--r--ext/webgpu/lib.rs26
1 files changed, 14 insertions, 12 deletions
diff --git a/ext/webgpu/lib.rs b/ext/webgpu/lib.rs
index 8e13a8050..aa6207d34 100644
--- a/ext/webgpu/lib.rs
+++ b/ext/webgpu/lib.rs
@@ -117,18 +117,20 @@ impl Resource for WebGpuQuerySet {
}
pub fn init(unstable: bool) -> Extension {
- Extension::builder(env!("CARGO_PKG_NAME"))
- .dependencies(vec!["deno_webidl", "deno_web"])
- .esm(include_js_files!("01_webgpu.js", "02_idl_types.js",))
- .ops(declare_webgpu_ops())
- .state(move |state| {
- // TODO: check & possibly streamline this
- // Unstable might be able to be OpMiddleware
- // let unstable_checker = state.borrow::<super::UnstableChecker>();
- // let unstable = unstable_checker.unstable;
- state.put(Unstable(unstable));
- })
- .build()
+ Extension::builder_with_deps(
+ env!("CARGO_PKG_NAME"),
+ &["deno_webidl", "deno_web"],
+ )
+ .esm(include_js_files!("01_webgpu.js", "02_idl_types.js",))
+ .ops(declare_webgpu_ops())
+ .state(move |state| {
+ // TODO: check & possibly streamline this
+ // Unstable might be able to be OpMiddleware
+ // let unstable_checker = state.borrow::<super::UnstableChecker>();
+ // let unstable = unstable_checker.unstable;
+ state.put(Unstable(unstable));
+ })
+ .build()
}
fn deserialize_features(features: &wgpu_types::Features) -> Vec<&'static str> {