Taking Elixir to the Metal
summary
Demonstrates building Elixir NIFs in Rust using Rustler to avoid crashing the BEAM and to catch panics, with a native JSON parser wired into Mix. A naive NIF decoding an 8 MB JSON takes ~1.5s and reports only 10 reductions; reworking to chunked parsing with resource objects and a mutex raises that to 11,000 reductions and avoids scheduler collapse. Also shows dirty schedulers and threaded NIFs so long work returns immediately and sends results asynchronously.
AI-written summary · about
chapters (48)
- 0:00Intro
- 0:50Elixir
- 1:06Trinity
- 1:19Orchestration
- 2:17Erlang
- 3:27Port Drivers
- 5:34WARNING
- 6:02ElixirNIFs
- 6:52Functionality
- 8:17If structure
- 9:45NIF term
- 9:57NIF func
- 10:56C
- 11:13Rust
- 12:20Rust accolades
- 13:16Erlang NIF sis
- 14:25Rust Library
- 16:33Getting Started
- 16:45Rustler
- 17:13Mix
- 18:09Init
- 18:24Rust File
- 19:48Simple Approach
- 20:07Decoder
- 22:28JSON2Term
- 23:05Time
- 24:07naive approach
- 24:32strange behaviors
- 25:22Cores
- 26:09Schedulers
- 26:22Run Queue
- 28:16Thread Progress
- 28:39Scheduler Threads
- 31:06Account Reductions
- 31:32Count Reductions
- 31:47Chunking
- 32:09JSON Parser
- 33:19Resource Objects
- 35:35Mutex
- 37:19Sink
- 39:44Results
- 39:57Reschedule
- 41:12Threaded News
- 41:50Threaded Decode
- 42:52Elixir Decode
- 43:14Dirtiness
- 44:19scheduler flags
- 45:19Conclusion
related talks
46mTaking Elixir to the Metal with Rust
52mA Taste of Elixir - The language of the future you can have today
01h 00mFrom Tiny Chips to Server Racks: Deploying AI Everywhere with Rust
27mNext-Generation Programming: Rust & Elm
34mWhoops! I Rewrote it in Rust
17mPerformant, Readable and Interoperable Rust from Dafny
46mRust for Rubyists
26mAllocating Less: Really Thin Rust Cloud Apps
