diff options
Diffstat (limited to 'op_crates/webgpu/lib.rs')
-rw-r--r-- | op_crates/webgpu/lib.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/op_crates/webgpu/lib.rs b/op_crates/webgpu/lib.rs index a9cbbb882..b5b2905b2 100644 --- a/op_crates/webgpu/lib.rs +++ b/op_crates/webgpu/lib.rs @@ -95,22 +95,22 @@ impl Resource for WebGpuQuerySet { } pub fn init(unstable: bool) -> Extension { - Extension::with_ops( - include_js_files!( + Extension::builder() + .js(include_js_files!( prefix "deno:op_crates/webgpu", "01_webgpu.js", "02_idl_types.js", - ), - declare_webgpu_ops(), - Some(Box::new(move |state| { + )) + .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)); Ok(()) - })), - ) + }) + .build() } pub fn get_declaration() -> PathBuf { |