rustler icon indicating copy to clipboard operation
rustler copied to clipboard

Document use with Erlang

Open lpil opened this issue 6 years ago • 9 comments

Hello!

Thanks for this lib.

There is great documentation and examples for use in an Elixir project, but none for an Erlang project. Would it be possible to add this?

Thanks, Louis

lpil avatar Jan 31 '18 13:01 lpil

@lpil currently, the rustler_mix project is a mix compiler. There is this issue which asks about rebar3 support.

I think we should definitely provide some guidance about that but haven't taken the time to explore it yet.

scrogson avatar Jan 31 '18 15:01 scrogson

The elixir -> erlang code should be a direct conversion, what issues are there?

Mix supports full native erlang as well.

OvermindDL1 avatar Jan 31 '18 15:01 OvermindDL1

@OvermindDL1 I think the main thing is people who are building a project exclusively with erlang may not want to bring elixir into their project just to compile a rust crate.

scrogson avatar Jan 31 '18 15:01 scrogson

Yes, I'd like to avoid adding Elixir to this project :)

lpil avatar Jan 31 '18 15:01 lpil

Any examples yet?

DeadZen avatar May 13 '18 21:05 DeadZen

My reason is I prefer erlang syntax over elixir syntax.

progamer71 avatar Jun 12 '18 13:06 progamer71

My reason is I prefer erlang syntax over elixir syntax.

Yeah many of us do, Erlang's syntax is just so superior, but Elixir's Macro's and everything they bring in is the main thing that keeps me working in Elixir. ^.^;

OvermindDL1 avatar Jun 12 '18 14:06 OvermindDL1

there's a good blog post here https://medium.com/@vonmo/erlang-safe-optimization-with-nif-on-rust-6000b0e9e4bf that covers the basics of running rustler with erlang. I use rustler with erlang so that I can use quviq EQC to test Rust components. I have a few issues (I don't know how to have multiple modules in the same crate for example) but in general it works really well.

I don't have the time right now, but when I do I can write up how to use rustler from erlang

russelldb avatar Nov 05 '19 09:11 russelldb

I started work on using your rustler_tests from a rebar3 project at https://github.com/rickpayne/rustler_test

rickpayne avatar May 01 '20 06:05 rickpayne