Slide 1

Slide 1 text

With Rust Extend elixir Rust MX

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

https://www.nasa.gov/

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

@phonnz Intuitivo

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

https://redmonk.com/

Slide 9

Slide 9 text

Agenda ● Elixir ● NIF ● Rustler ● Basics ● Example

Slide 10

Slide 10 text

Elixir ● Functional language (10 years). ● Erlang BEAM runtime. ● Process order (M) ● Macro system. ● Let It Crash philosophy. ● Concurrency. ● Other languages best practices based.

Slide 11

Slide 11 text

● C functions. ● Transparent functions. ● Shared Library. (SO, dll) ● Runtime loadable. NIFs ● Dynamically linked ● Fastest way of calling C-code, Rust, Go.

Slide 12

Slide 12 text

Rustler ● Erlang NIFs ● Safe Rust Code ● No BEAM crash ● Catches rust panics. ● Supports Erlang as well ● Decoding Rust Values ● Encoding Rust values ● Type composition ● Safe reference passing.

Slide 13

Slide 13 text

Elixir Dependecy {:rustler, "~> 0.21.1"}

Slide 14

Slide 14 text

Compiler defp rustler_crates do [ rustex: [path: "native/rustex", mode: if(Mix.env() == :prod, do: :release, else: :debug)] ] end

Slide 15

Slide 15 text

Elixir

Slide 16

Slide 16 text

Rust

Slide 17

Slide 17 text

Recursos https://github.com/rusterlium/rustler https://docs.rs/crate/rustler/0.21.1 https://www.youtube.com/watch?v=OvImHwddP44 https://speakerdeck.com/phonnz/rustmx-rustler

Slide 18

Slide 18 text

@phonnz [email protected] Q&A