mirror of
https://github.com/denoland/deno.git
synced 2024-12-26 09:10:40 -05:00
65d9bfb533
This is a new op system that will eventually replace `#[op]`. Features - More maintainable, generally less-coupled code - More modern Rust proc-macro libraries - Enforces correct `fast` labelling for fast ops, allowing for visual scanning of fast ops - Explicit marking of `#[string]`, `#[serde]` and `#[smi]` parameters. This first version of op2 supports integer and Option<integer> parameters only, and allows us to start working on converting ops and adding features.
6 lines
134 B
Rust
6 lines
134 B
Rust
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
|
|
#[op2(fast)]
|
|
fn op_add(a: u32, b: u32) -> u32 {
|
|
a + b
|
|
}
|