Skip to content

How to write Rust plugin for Deno & performance benchmark for one custom plugin Op call

Notifications You must be signed in to change notification settings

playerx/deno-rust-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Goals

This demo project had multiple goals:

  1. Demonstrate how to write custom Rust Plugin and call it from Typescript
  2. How to call Sync & Async functions in Rust from Typescript
  3. See how much performance overhead it takes to call pure empty function in Rust and return the result back to Typescript

Requirements

How to run

  1. make
  2. make run or deno run --allow-plugin --unstable --allow-hrtime mod.ts

Performance

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

Related

nodejs-cpp-binding

About

How to write Rust plugin for Deno & performance benchmark for one custom plugin Op call

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published