Cant run cargo test
on linux
#662
-
On rustler 0.34, linux, rust 1.79, erlang 26, and newly created crate (via
Note that |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
If you want to test things that use actual NIF functionality, you have to test them from a running BEAM (eg. using ExUnit), as that is where they are implemented. Rustler itself just links to them. |
Beta Was this translation helpful? Give feedback.
-
What can work quite well is to split your crate into two (or more) crates, where one crate is only used to expose the internals to BEAM. Then you can run |
Beta Was this translation helpful? Give feedback.
Could you try 0.35? It should actually "work" now as long as you don't have any code path that calls an
enif_*
function under the hood. But that aside, I agree with @evnu's suggestion to split the crate up. We could theoretically implement a "mini-BEAM" backend to use in tests, if someone is bored :)