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
250
0
Share
Helix: Ruby Native Extensions Without Fear
Helix makes writing Ruby classes in Rust safe and fun. Find out how!
Godfrey Chan
April 26, 2017
More Decks by Godfrey Chan
See All by Godfrey Chan
Virtual EmberConf 2022: Platform State of the Union
chancancode
0
290
Virtual EmberConf 2021: Platform State of the Union
chancancode
0
230
Virtual EmberConf 2020: Platform State of the Union
chancancode
1
360
Thinking in TypeScript
chancancode
0
300
The Lifecycle of a Rails Request
chancancode
3
14k
Dropping Down To The Metal™ (2018)
chancancode
0
150
Using Skylight to Solve Real-World Performance Problems
chancancode
1
410
Prying Open The Black Box (EmberConf 2018)
chancancode
0
410
Bending The Curve: Putting Rust in Ruby with Helix
chancancode
2
2.9k
Other Decks in Programming
See All in Programming
Everything Claude Code OSS詳細 — 5層構造の中身と導入方法
targe
0
160
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
970
Offline should be the norm: building local-first apps with CRDTs & Kotlin Multiplatform
renaudmathieu
0
110
AIエージェントで業務改善してみた
taku271
0
490
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
4.7k
Smarter Angular mit Transformers.js & Prompt API
christianliebel
PRO
1
120
Go_College_最終発表資料__外部公開用_.pdf
xe_pc23
0
130
How Swift's Type System Guides AI Agents
koher
0
160
存在論的プログラミング: 時間と存在を記述する
koriym
5
820
Going Multiplatform with Your Android App (Android Makers 2026)
zsmb
2
350
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
3
730
Migration to Signals, Signal Forms, Resource API, and NgRx Signal Store @Angular Days 03/2026 Munich
manfredsteyer
PRO
0
240
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
How to Ace a Technical Interview
jacobian
281
24k
Embracing the Ebb and Flow
colly
88
5k
Building AI with AI
inesmontani
PRO
1
870
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Information Architects: The Missing Link in Design Systems
soysaucechin
0
870
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.3k
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