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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Godfrey Chan
April 26, 2017
Programming
0
240
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
280
Virtual EmberConf 2021: Platform State of the Union
chancancode
0
220
Virtual EmberConf 2020: Platform State of the Union
chancancode
1
350
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
400
Prying Open The Black Box (EmberConf 2018)
chancancode
0
400
Bending The Curve: Putting Rust in Ruby with Helix
chancancode
2
2.9k
Other Decks in Programming
See All in Programming
JPUG勉強会 OSSデータベースの内部構造を理解しよう
oga5
2
220
猫の手も借りたい!ので AIエージェント猫を作って社内に放した話 Claude Code × Container Lambda の Slack Bot "DevNeko"
naramomi7
0
220
ふん…おもしれぇ Parser。RubyKaigi 行ってやるぜ
aki_pin0
0
120
DSPy入門 Pythonで実現する自動プロンプト最適化 〜人手によるプロンプト調整からの卒業〜
seaturt1e
1
380
Go1.26 go fixをプロダクトに適用して困ったこと
kurakura0916
0
310
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
710
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
7
1.2k
CSC307 Lecture 11
javiergs
PRO
0
580
AIに仕事を丸投げしたら、本当に楽になれるのか
dip_tech
PRO
0
170
15年目のiOSアプリを1から作り直す技術
teakun
0
570
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
2k
Event Storming
hschwentner
3
1.3k
Featured
See All Featured
Side Projects
sachag
455
43k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
760
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
110
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
750
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
660
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
270
The browser strikes back
jonoalderson
0
740
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
280
Optimising Largest Contentful Paint
csswizardry
37
3.6k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
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