diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2022-03-14 23:14:15 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-14 18:44:15 +0100 |
commit | b4e42953e1d243f2eda20e5be6b845d60b7bf688 (patch) | |
tree | 10b3bfff165f9c04f9174c7c399d44b9b724c3b3 /runtime/ops/runtime.rs | |
parent | 4e3ed37037a2aa1edeac260dc3463a81d9cf9b88 (diff) |
feat(core): codegen ops (#13861)
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
Diffstat (limited to 'runtime/ops/runtime.rs')
-rw-r--r-- | runtime/ops/runtime.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/ops/runtime.rs b/runtime/ops/runtime.rs index 19228af78..4f951383e 100644 --- a/runtime/ops/runtime.rs +++ b/runtime/ops/runtime.rs @@ -3,14 +3,14 @@ use crate::permissions::Permissions; use deno_core::anyhow::Context; use deno_core::error::AnyError; -use deno_core::op_sync; +use deno_core::op; use deno_core::Extension; use deno_core::ModuleSpecifier; use deno_core::OpState; pub fn init(main_module: ModuleSpecifier) -> Extension { Extension::builder() - .ops(vec![("op_main_module", op_sync(op_main_module))]) + .ops(vec![op_main_module::decl()]) .state(move |state| { state.put::<ModuleSpecifier>(main_module.clone()); Ok(()) @@ -18,6 +18,7 @@ pub fn init(main_module: ModuleSpecifier) -> Extension { .build() } +#[op] fn op_main_module( state: &mut OpState, _: (), |