Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Helix: Ruby Native Extensions Without Fear
Search
Godfrey Chan
April 26, 2017
Programming
290
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
320
Virtual EmberConf 2021: Platform State of the Union
chancancode
0
240
Virtual EmberConf 2020: Platform State of the Union
chancancode
1
390
Thinking in TypeScript
chancancode
0
320
The Lifecycle of a Rails Request
chancancode
3
15k
Dropping Down To The Metal™ (2018)
chancancode
0
180
Using Skylight to Solve Real-World Performance Problems
chancancode
1
460
Prying Open The Black Box (EmberConf 2018)
chancancode
0
440
Bending The Curve: Putting Rust in Ruby with Helix
chancancode
2
2.9k
Other Decks in Programming
See All in Programming
AI × TiDD / 2026.09.05 Redmine 大阪
tokudiro
1
180
[GoCon2026] When Goroutines Are Not Enough: Runtime Locality in High-Throughput Go
takehaya
6
2.4k
Intent as Code
shoppingjaws
6
1.1k
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
3
550
AHC070解法紹介
eijirou
0
130
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
4
3.2k
MVNOの申込からeSIM開通までをiOSアプリでつなぐ- 本人確認・MNP・通信事業者基盤をまたぐ実装
satotakeshi
0
450
WebMCP Challenge に星空観察アプリで参加した話
okajun35
0
180
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
290
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
330
XHTMLが残したもの
yosuke_furukawa
PRO
2
830
AI活用は、個人から組織へ|マルチプレイヤーエージェントハーネス「QM」の社内活用事例 / AI use is moving from individuals to orgs
rkaga
1
140
Featured
See All Featured
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Amusing Abliteration
ianozsvald
1
310
Bash Introduction
62gerente
615
220k
Heart Work Chapter 1 - Part 1
lfama
PRO
10
36k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.2k
KATA
mclloyd
PRO
35
15k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Paper Plane (Part 1)
katiecoart
PRO
2
11k
Embracing the Ebb and Flow
colly
88
5.2k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
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