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
Helix: Ruby Native Extensions Without Fear
Search
Godfrey Chan
April 26, 2017
Programming
0
220
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
250
Virtual EmberConf 2021: Platform State of the Union
chancancode
0
220
Virtual EmberConf 2020: Platform State of the Union
chancancode
1
330
Thinking in TypeScript
chancancode
0
280
The Lifecycle of a Rails Request
chancancode
3
14k
Dropping Down To The Metal™ (2018)
chancancode
0
120
Using Skylight to Solve Real-World Performance Problems
chancancode
1
370
Prying Open The Black Box (EmberConf 2018)
chancancode
0
370
Bending The Curve: Putting Rust in Ruby with Helix
chancancode
2
2.8k
Other Decks in Programming
See All in Programming
DockerからECSへ 〜 AWSの海に出る前に知っておきたいこと 〜
ota1022
5
1.8k
Kiroの仕様駆動開発から見えてきたAIコーディングとの正しい付き合い方
clshinji
1
180
A Gopher's Guide to Vibe Coding
danicat
0
190
オープンセミナー2025@広島「君はどこで動かすか?」アンケート結果
satoshi256kbyte
0
220
開発チーム・開発組織の設計改善スキルの向上
masuda220
PRO
17
9.4k
TDD 実践ミニトーク
contour_gara
1
250
MCPで実現するAIエージェント駆動のNext.jsアプリデバッグ手法
nyatinte
7
990
コンテキストエンジニアリング Cursor編
kinopeee
1
730
兎に角、コードレビュー
mitohato14
0
160
Improving my own Ruby thereafter
sisshiki1969
1
130
UbieのAIパートナーを支えるコンテキストエンジニアリング実践
syucream
2
780
The State of Fluid (2025)
s2b
0
210
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
A better future with KSS
kneath
239
17k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Agile that works and the tools we love
rasmusluckow
330
21k
BBQ
matthewcrist
89
9.8k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3k
It's Worth the Effort
3n
187
28k
Building Better People: How to give real-time feedback that sticks.
wjessup
368
19k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
Into the Great Unknown - MozCon
thekraken
40
2k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
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