rusterlium / rustler

Safe Rust bridge for creating Erlang NIF functions
https://docs.rs/crate/rustler
Apache License 2.0
4.24k stars 222 forks source link

** (RuntimeError) calling `cargo metadata` failed. #618

Closed Maxino22 closed 1 month ago

Maxino22 commented 1 month ago

I'm pretty new to this I have experience with elixir but very basic on rust. reading articles on rustler seems pretty cool what you can do with the two but I haven’t been able to get past the setup and running the demo... i keep getting the metadata failed I tried downgrading but no difference.

This is what is on terminal.

mac@VL8-L016 snipping_crab % mix rustler.check
Compiling 1 file (.ex)
spawn: Could not cd to native/snippy_crab

== Compilation error in file lib/snipping_crab/snippy_crab.ex ==
** (RuntimeError) calling `cargo metadata` failed.

    (rustler 0.25.0) lib/rustler/compiler/config.ex:87: Rustler.Compiler.Config.metadata!/1
    (rustler 0.25.0) lib/rustler/compiler/config.ex:69: Rustler.Compiler.Config.build/1
    (rustler 0.25.0) lib/rustler/compiler.ex:9: Rustler.Compiler.compile_crate/2
    lib/snipping_crab/snippy_crab.ex:2: (module) 

while my linter shows.

** (RuntimeError) calling `cargo metadata` failed.

    (rustler 0.25.0) lib/rustler/compiler/config.ex:87: Rustler.Compiler.Config.metadata!/1
    (rustler 0.25.0) lib/rustler/compiler/config.ex:69: Rustler.Compiler.Config.build/1
    (rustler 0.25.0) lib/rustler/compiler.ex:9: Rustler.Compiler.compile_crate/2
    lib/snipping_crab/snippy_crab.ex:2: (module)
    (elixir 1.16.2) lib/kernel/parallel_compiler.ex:428: anonymous fn/5 in Kernel.ParallelCompiler.spawn_workers/8
Elixir

Kindly assist