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
170
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
140
Profile & Analyze Node.js Applications
gioyik
0
120
Node.js Contributor Workshop
gioyik
0
100
Profile & Analyze Node.js Applications like a Pro
gioyik
1
86
Leak Hunting - Finding and debugging a memory leak in Nodejs.pdf
gioyik
1
990
Finding and debugging a memory leak in Node.js
gioyik
0
200
Road to LISP heaven
gioyik
1
140
Leak Hunting: Finding and debugging a memory leak in Node.js
gioyik
0
570
Performance first: Node.js and Rust
gioyik
0
190
Other Decks in Technology
See All in Technology
ThetaOS - A Mythical Machine comes Alive
aslander
0
210
「お金で解決」が全てではない!大規模WebアプリのCI高速化 #phperkaigi
stefafafan
5
2.4k
「活動」は激変する。「ベース」は変わらない ~ 4つの軸で捉える_AI時代ソフトウェア開発マネジメント
sentokun
0
110
Navigation APIと見るSvelteKitのWeb標準志向
yamanoku
2
120
パワポ作るマンをMCP Apps化してみた
iwamot
PRO
0
160
Sansanの認証基盤を支えるアーキテクチャとその振り返り
sansantech
PRO
1
110
【AWS】CloudTrail LakeとCloudWatch Logs Insightsの使い分け方針
tsurunosd
0
120
Agent Skill 是什麼?對軟體產業帶來的變化
appleboy
0
240
韓非子に学ぶAI活用術
tomfook
3
1.1k
AIエージェントを用いたメンバー育成支援について
csakurah
0
100
ブラックボックス化したMLシステムのVertex AI移行 / mlops_community_62
visional_engineering_and_design
1
210
君はジョシュアツリーを知っているか?名前をつけて事象を正しく認識しよう / Do you know Joshua Tree?
ykanoh
4
140
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
GraphQLとの向き合い方2022年版
quramy
50
14k
Designing for Timeless Needs
cassininazir
0
170
Embracing the Ebb and Flow
colly
88
5k
Abbi's Birthday
coloredviolet
2
5.9k
Context Engineering - Making Every Token Count
addyosmani
9
780
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.1k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
180
Information Architects: The Missing Link in Design Systems
soysaucechin
0
850
Building an army of robots
kneath
306
46k
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