| Crates.io | deno_ops |
| lib.rs | deno_ops |
| version | 0.238.0 |
| created_at | 2022-03-14 17:10:13.243361+00 |
| updated_at | 2025-09-23 23:05:48.792381+00 |
| description | Proc macro for writing Deno Ops |
| homepage | |
| repository | https://github.com/denoland/deno_core |
| max_upload_size | |
| id | 549997 |
| size | 896,787 |
proc_macro for generating highly optimized V8 functions from Rust functions.
use deno_core::{op2, extension};
// Declare an op.
#[op2(fast)]
pub fn op_add(a: i32, b: i32) -> i32 {
a + b
}
// Register with an extension.
extension!(
math,
ops = [op_add]
)