hswick / exw3

High level Ethereum RPC Client for Elixir

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't compile ex_keccak

tansanDOTeth opened this issue · comments

This is the the error I am getting when trying to compile. I'm using a Mac Air with an M1 processor. Any ideas how to fix this?

$ mix compile
==> ex_keccak
Compiling 1 file (.ex)

== Compilation error in file lib/ex_keccak.ex ==
** (ErlangError) Erlang error: :enoent
    (elixir 1.13.2) lib/system.ex:1044: System.cmd("cargo", ["metadata", "--format-version=1"], [cd: "native/exkeccak"])
    (rustler 0.22.2) lib/rustler/compiler/config.ex:81: Rustler.Compiler.Config.external_resources/2
    (rustler 0.22.2) lib/rustler/compiler/config.ex:69: Rustler.Compiler.Config.build/1
    (rustler 0.22.2) lib/rustler/compiler.ex:9: Rustler.Compiler.compile_crate/2
    lib/ex_keccak.ex:2: (module)
could not compile dependency :ex_keccak, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile ex_keccak", update it with "mix deps.update ex_keccak" or clean it with "mix deps.clean ex_keccak"

@astroTANSAN Hello. I think you need to install rust - https://www.rust-lang.org/tools/install

@ayrat555 I'll give that a try, thank you!

Is it normal for the compile to take a long time for that library?

@astroTANSAN do you mean the ex_kecak nif? it's ok

How can I verify with an Ethereum address? how would I convert the ethereum wallet address into a public key? does the string for the message have to be converted as well?

:ok = ExSecp256k1.verify(message, signature, public_key)