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
210
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
210
Virtual EmberConf 2020: Platform State of the Union
chancancode
1
330
Thinking in TypeScript
chancancode
0
270
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
360
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
ruby.wasmで多人数リアルタイム通信ゲームを作ろう
lnit
2
330
A2A プロトコルを試してみる
azukiazusa1
2
1.3k
Rubyでやりたい駆動開発 / Ruby driven development
chobishiba
1
530
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
370
CursorはMCPを使った方が良いぞ
taigakono
1
210
ペアプロ × 生成AI 現場での実践と課題について / generative-ai-in-pair-programming
codmoninc
0
230
Discover Metal 4
rei315
2
110
Team topologies and the microservice architecture: a synergistic relationship
cer
PRO
0
1.2k
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
480
システム成長を止めない!本番無停止テーブル移行の全貌
sakawe_ee
1
150
Modern Angular with Signals and Signal Store:New Rules for Your Architecture @enterJS Advanced Angular Day 2025
manfredsteyer
PRO
0
170
PipeCDのプラグイン化で目指すところ
warashi
1
230
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.4k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.5k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
A Tale of Four Properties
chriscoyier
160
23k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Making Projects Easy
brettharned
116
6.3k
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.4k
The Pragmatic Product Professional
lauravandoore
35
6.7k
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