Skip to content

korczis/rustler-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RustlerTest

Status

Build Status

Getting Started

git clone https://github.com/korczis/rustler-test.git
cd rustler-test
mix deps.get
mix deps.compile
mix test

Example

$ iex -S mix
Erlang/OTP 19 [erts-8.3] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

Compiling NIF crate :calculator (native/calculator)...
    Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Interactive Elixir (1.4.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> Calculator.Native.add(123, 456)
{:ok, 579}
iex(2)> Calculator.Native.sub(123, 456)
{:ok, -333}
iex(3)>

About

Working Example of Rustler - Safe Rust bridge for creating Erlang NIF functions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published