Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Rust for Node.js Developers
Search
Giovanny Gongora
October 21, 2016
Technology
0
120
Rust for Node.js Developers
Presented: Connect.Tech 2016
Giovanny Gongora
October 21, 2016
Tweet
Share
More Decks by Giovanny Gongora
See All by Giovanny Gongora
Memory Chronicles: Manage, Trace and Fix Memory Leaks
gioyik
0
68
Profile & Analyze Node.js Applications
gioyik
0
43
Node.js Contributor Workshop
gioyik
0
29
Profile & Analyze Node.js Applications like a Pro
gioyik
1
40
Leak Hunting - Finding and debugging a memory leak in Nodejs.pdf
gioyik
1
700
Finding and debugging a memory leak in Node.js
gioyik
0
130
Road to LISP heaven
gioyik
1
81
Leak Hunting: Finding and debugging a memory leak in Node.js
gioyik
0
460
Performance first: Node.js and Rust
gioyik
0
130
Other Decks in Technology
See All in Technology
継続的な改善 x ⾮連続的な進化
sansantech
PRO
3
150
20分で完全に理解するGrafanaダッシュボード
hamadakoji
3
430
アクセシビリティを考慮したUI/CSSフレームワーク・ライブラリ選定
yajihum
2
1k
JAWS-UG Bedrock Claude Night
yamahiro
3
570
MLOpsの「壁」を乗り越える、LINEヤフーの Data Quality as Code
lycorptech_jp
PRO
5
500
本当のAWS基礎
toru_kubota
0
510
TechFeed Experts Night#27 〜 フロントエンドフレームワーク最前線 (Svelte)
baseballyama
1
440
SIEMを用いて、セキュリティログ分析の可視化と分析を実現し、PDCAサイクルを回してみた
coconala_engineer
0
280
プロトタイピングによる不確実性の低減 / Reducing Uncertainty through Prototyping
ohbarye
5
380
コンテナセキュリティの基本と脅威への対策
kyohmizu
3
760
どうするコスト最適化のトレードオフ
tetsuyaooooo
1
510
コードを書く隙間を見つけて生きていく技術/Findy 思考の現在地
fujiwara3
27
5.9k
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
243
12k
Rebuilding a faster, lazier Slack
samanthasiow
73
8.2k
Mobile First: as difficult as doing things right
swwweet
216
8.6k
How GitHub Uses GitHub to Build GitHub
holman
468
290k
From Idea to $5000 a Month in 5 Months
shpigford
377
45k
The Language of Interfaces
destraynor
151
23k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
Faster Mobile Websites
deanohume
299
30k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
78
42k
How STYLIGHT went responsive
nonsquared
92
4.8k
Bootstrapping a Software Product
garrettdimon
PRO
302
110k
Scaling GitHub
holman
457
140k
Transcript
Rust for Node.js Developers Giovanny Gongora / @gioyik
OUTLINE • What is Rust? • Why using Rust with
Node.js • Rust inside Node.js • FFI on Node.js • Let’s do it • More ways?
WHAT IS RUST? 1. A systems programming language 2. It
focuses on speed, safety and concurrency 3. Great fit to write programs with specific time requirements 4. Ability to write low level code, like device drivers 5. No garbage collector
What does it look like? You can run this on
https://play.rust-lang.org if you don’t have Rust installed
WHY SHOULD I CARE?
WHY USING RUST WITH NODE.JS 1. Performance 2. Parallelism 3.
Bindings
ANY REAL ADVANTAGE WE COULD SEE? Yes, but not today
RUST INSIDE NODE.JS (really?)
THE PROBLEM “Start ten threads. Inside each thread, count from
one to five million. After all then threads are finished, print out ‘done!’”
Let’s create a new cargo project configure Cargo.toml
Edit the lib Build it
Create your node file Check the output
LET’S TRY A LESS COMPLEX EXAMPLE!
Let’s create a new cargo project configure Cargo.toml
Edit the lib Build it
Create your node file profit!
MORE WAYS?
LET’S TRY A COMPLEX EXAMPLE!
NEON Neon is a Rust bridge to the Node.js platform:
an API (and a set of tools) for implementing binary Node modules in Rust
RUNO [PROTOTYPE] RuNo bridge is a command line tool which
generates C++ boilerplate add-on code to call Rust library from.
CONCLUSIONS
SHOULD I TRY RUST?
SO, USE RUST INSTEAD OF JAVASCRIPT ON WEB APPLICATIONS?
THANKS! More info at Rust Inside Other Languages Giovanny Gongora
/ @gioyik