Episode

Rustler: Bridging Elixir and Rust with Sonny Scroggin

Podcast
Elixir Wizards
Published
Jun 26, 2025
Duration seconds
2938
Processing state
processed
Canonical source
https://smartlogic.fireside.fm/s14-e05-rustler-bridging-elixir-rust
Audio
https://aphid.fireside.fm/d/1437767933/03a50f66-dc5e-4da4-ab6e-31895b6d4c9e/817d0e9a-7634-4bdd-a220-6b8667f0c572.mp3
JSON
/v1/public/podcasts/elixir-wizards/episodes/rustler-bridging-elixir-and-rust-with-sonny-scroggin
Markdown
/podcast/elixir-wizards/rustler-bridging-elixir-and-rust-with-sonny-scroggin.md

Actions

  • 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.
  • 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.

Summary

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…