diff options
Diffstat (limited to 'ext/node/lib.rs')
-rw-r--r-- | ext/node/lib.rs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/ext/node/lib.rs b/ext/node/lib.rs index 411151f2f..c492d93d8 100644 --- a/ext/node/lib.rs +++ b/ext/node/lib.rs @@ -95,7 +95,19 @@ fn op_node_build_os() -> String { .to_string() } -pub fn init_polyfill() -> Extension { +pub fn init_polyfill_ops() -> Extension { + Extension::builder(env!("CARGO_PKG_NAME")) + .ops(vec![ + crypto::op_node_create_hash::decl(), + crypto::op_node_hash_update::decl(), + crypto::op_node_hash_digest::decl(), + crypto::op_node_hash_clone::decl(), + op_node_build_os::decl(), + ]) + .build() +} + +pub fn init_polyfill_ops_and_esm() -> Extension { let esm_files = include_js_files!( dir "polyfills", "_core.ts", |