Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Helix: Ruby Native Extensions Without Fear
Search
Godfrey Chan
April 26, 2017
Programming
0
230
Helix: Ruby Native Extensions Without Fear
Helix makes writing Ruby classes in Rust safe and fun. Find out how!
Godfrey Chan
April 26, 2017
Tweet
Share
More Decks by Godfrey Chan
See All by Godfrey Chan
Virtual EmberConf 2022: Platform State of the Union
chancancode
0
270
Virtual EmberConf 2021: Platform State of the Union
chancancode
0
220
Virtual EmberConf 2020: Platform State of the Union
chancancode
1
340
Thinking in TypeScript
chancancode
0
290
The Lifecycle of a Rails Request
chancancode
3
14k
Dropping Down To The Metal™ (2018)
chancancode
0
140
Using Skylight to Solve Real-World Performance Problems
chancancode
1
390
Prying Open The Black Box (EmberConf 2018)
chancancode
0
380
Bending The Curve: Putting Rust in Ruby with Helix
chancancode
2
2.8k
Other Decks in Programming
See All in Programming
dotfiles 式年遷宮 令和最新版
masawada
1
760
tsgolintはいかにしてtypescript-goの非公開APIを呼び出しているのか
syumai
6
2.1k
CSC509 Lecture 14
javiergs
PRO
0
220
sbt 2
xuwei_k
0
270
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
120
TypeScriptで設計する 堅牢さとUXを両立した非同期ワークフローの実現
moeka__c
6
3k
AIコーディングエージェント(Gemini)
kondai24
0
210
Microservices Platforms: When Team Topologies Meets Microservices Patterns
cer
PRO
1
1k
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
9
1.1k
AWS CDKの推しポイントN選
akihisaikeda
1
240
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
6
2.9k
手が足りない!兼業データエンジニアに必要だったアーキテクチャと立ち回り
zinkosuke
0
630
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.2k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Become a Pro
speakerdeck
PRO
31
5.7k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
1
96
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.3k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Typedesign – Prime Four
hannesfritz
42
2.9k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Git: the NoSQL Database
bkeepers
PRO
432
66k
Building Adaptive Systems
keathley
44
2.9k
Transcript
Previously…
Ruby is slow… – Usually it doesn’t matter – Most
workload are I/O bound – But occasionally it does…
“Best of both worlds” – Native extensions – JSON gem
– Very fast – Transparent to the user – Date, Pathname, etc…
Turbo Rails…? – String#blank? – Sam Saffron’s fast_blank – 50
LOC in C – 20x speedup
But C… – Unsafe – Risky – segfaults! – Maintenance
burden – Contribution barrier
Skylight Agent – Started with Ruby – Too much overhead
– Native extension! – But C…
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 Ruby, but without GC
Zero-cost abstractions™ – In Ruby: tension between abstractions and performance
– Symbol#to_proc, Enumerable#map, etc – In Rust: no such tradeoff – Compiler is magic
fast_blank in Rust* * boilerplate not included
fast_blank in Helix
The vision – Keep writing the Ruby you love… –
…without the fear of eventually hitting a wall – Start with Ruby – Move to Helix when appropriate
Last year – Good proof-of-concept – Too hard to use
– Missing basic features
This year – Deploy to production – Polish, documentation –
Features – Focus on Rails
Demo! – End-to-end example – Deploy to Heroku – It
works!™
▶ http://chancancode.tv/helix
Good use cases – CPU-bound – Simple inputs – Avoid
chatty APIs
Good use cases
Good use cases – Use Rust libraries – Leverage Rust
web browser tech – Mailer, Background job, Action Cable
None
Roadmap – Greenfield project – Drop-in replacement – Reopen class
– Ship to production – Binary distribution – Non-traditional use-cases – Performance parity with C – Miscellaneous features and QoL improvements
usehelix.com