Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Neon: JavaScript Native Extensions in Rust - Dreamforce 2017 OSS Booth

B87c43d4be875c9b41cd436f5c364f75?s=47 hone
November 06, 2017

Neon: JavaScript Native Extensions in Rust - Dreamforce 2017 OSS Booth

B87c43d4be875c9b41cd436f5c364f75?s=128

hone

November 06, 2017
Tweet

More Decks by hone

Other Decks in Programming

Transcript

  1. Neon JavaScript Native Extensions in Rust

  2. JavaScript Native Extensions (C++) • Unsafe • Risky - segfaults!

    • Maintenance burden • Contribution barrier • Cross Platform Support
  3. None
  4. Meet Rust • Like C: compiled, statically typed, very fast

    • Unlike C: enjoyable to use, guarantees safety • "If it compiles, it doesn't crash" • Same guarantee as JavaScript with memory safety • Strong C/FFI support
  5. Cargo - Dependency Manager

  6. What is Neon? • Rust bindings for writing safe and

    fast native Node.js modules • Crash free memory protection (works with JS GC) • Parallelism (use multiple threads)
  7. Mandelbrot Demo

  8. None
  9. z n+1 = z n 2 + c

  10. DEMO https://github.com/hone/electronjs-mandelbrot https://github.com/hone/neon-mandelbrot

  11. Wire App

  12. None
  13. Neon @ Heroku/Salesforce

  14. Heroku/SFDX CLI

  15. Distribution