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
150
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
130
Profile & Analyze Node.js Applications
gioyik
0
91
Node.js Contributor Workshop
gioyik
0
79
Profile & Analyze Node.js Applications like a Pro
gioyik
1
71
Leak Hunting - Finding and debugging a memory leak in Nodejs.pdf
gioyik
1
920
Finding and debugging a memory leak in Node.js
gioyik
0
180
Road to LISP heaven
gioyik
1
110
Leak Hunting: Finding and debugging a memory leak in Node.js
gioyik
0
540
Performance first: Node.js and Rust
gioyik
0
180
Other Decks in Technology
See All in Technology
なぜスクラムはこうなったのか?歴史が教えてくれたこと/Shall we explore the roots of Scrum
sanogemaru
3
860
Snowflakeの生成AI機能を活用したデータ分析アプリの作成 〜Cortex AnalystとCortex Searchの活用とStreamlitアプリでの利用〜
nayuts
0
270
おやつは300円まで!の最適化を模索してみた
techtekt
PRO
0
270
Obsidian応用活用術
onikun94
1
380
エラーとアクセシビリティ
schktjm
0
950
Automating Web Accessibility Testing with AI Agents
maminami373
0
990
Kubernetes における cgroup driver のしくみ: runwasi の bugfix より
z63d
2
130
エニグモ_会社紹介資料(エンジニア職種向け).pdf
enigmo_hr
0
2.2k
PRDの正しい使い方 ~AI時代にも効く思考・対話・成長ツールとして~
techtekt
PRO
4
2.5k
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
30k
Kiroと学ぶコンテキストエンジニアリング
oikon48
6
8.7k
機械学習を扱うプラットフォーム開発と運用事例
lycorptech_jp
PRO
0
130
Featured
See All Featured
Visualization
eitanlees
148
16k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
The Invisible Side of Design
smashingmag
301
51k
Testing 201, or: Great Expectations
jmmastey
45
7.6k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
51
5.6k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
We Have a Design System, Now What?
morganepeng
53
7.8k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
111
20k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Embracing the Ebb and Flow
colly
87
4.8k
Automating Front-end Workflow
addyosmani
1370
200k
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