This demo project had multiple goals:
- Demonstrate how to write custom Rust Plugin and call it from Typescript
- How to call Sync & Async functions in Rust from Typescript
- See how much performance overhead it takes to call pure empty function in Rust and return the result back to Typescript
make
make run
ordeno run --allow-plugin --unstable --allow-hrtime mod.ts
Hardware:
MacBook Pro (Retina, 15-inch, Mid 2014)
2.2 GHz Quad-Core Intel Core i7
16 GB 1600 MHz DDR3
100000 Iterations
Result: 1 custom (sync) op call duration
Avg | Fastest |
---|---|
9820ns | 6649ns |