# Rustler: Bridging Elixir and Rust with Sonny Scroggin Page: https://stenobird.com/podcast/elixir-wizards/rustler-bridging-elixir-and-rust-with-sonny-scroggin Text version: https://stenobird.com/podcast/elixir-wizards/rustler-bridging-elixir-and-rust-with-sonny-scroggin.md Podcast: [Elixir Wizards](https://stenobird.com/podcast/elixir-wizards) Published: 2025-06-26T10:30:00+00:00 Episode link: https://smartlogic.fireside.fm/s14-e05-rustler-bridging-elixir-rust Audio file: https://aphid.fireside.fm/d/1437767933/03a50f66-dc5e-4da4-ab6e-31895b6d4c9e/817d0e9a-7634-4bdd-a220-6b8667f0c572.mp3 Processing state: processed JSON: https://stenobird.com/v1/public/podcasts/elixir-wizards/episodes/rustler-bridging-elixir-and-rust-with-sonny-scroggin Duration seconds: 2938 ## Resource Rustler Core Team Member Sonny Scroggin joins Elixir Wizards Sundi Myint and Charles Suggs. Rustler serves as a bridge to write Native Implemented Functions (NIFs) in Rust that can be called from Elixir code. This combo leverages Rust's performance and memory safety while maintaining Elixir's fault tolerance and concurrency model, creating a powerful solution for CPU-intensive operations within Elixir applications. Sonny provides guidance on when developers should consider using NIFs versus other approaches like ports or external services and highlights the considerations needed when stepping outside Elixir's standard execution model into native code. Looking toward the future, Sonny discusses exciting developments for Rustler, including an improved asynchronous NIF interface, API modernization efforts, and better tooling. While Rust offers tremendous performance benefits for specific use cases, Sonny emphasizes that Elixir's dynamic nature and the BEAM's capabilities for distributed systems remain unmatched for many applications. Rustler simply provides another powerful tool that expands what developers can accomplish within the Elixir ecosystem. Key topics discussed in this episode: Rust as a "high-level low-level language" with memory safety NIFs (Native Implemented Functions) in the BEAM virtual machine Rustler's role simplifying Rust-Elixir integration with macros CPU-intensive operations as primary NIF use cases Beam scheduler interaction considerations with native code Dirty schedulers for longer-running NIFs in OTP 20+ Memory safety advantages of Rust for NIFs Development workflow using Mix tasks for Rustler Common pitfalls when first working with Rust Error handling improvements possible with Rustler NIFs Differences between ports, NIFs, and external… ## Actions - request_transcript: `POST https://stenobird.com/v1/public/podcasts/elixir-wizards/episodes/rustler-bridging-elixir-and-rust-with-sonny-scroggin/transcription-requests` — Idempotently request low-priority transcript generation for this episode. - read_markdown: `GET https://stenobird.com/podcast/elixir-wizards/rustler-bridging-elixir-and-rust-with-sonny-scroggin.md` — Read the agent-friendly Markdown representation of this episode resource. A page view does not enqueue transcription. Agents should invoke `request_transcript` explicitly when they need this episode processed. ## Transcript Full transcripts are not published on public pages unless there is a clear rights basis.