Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elixir: Relative path to extism/rust fails to compile #343

Closed
code0100fun opened this issue May 15, 2023 · 4 comments
Closed

Elixir: Relative path to extism/rust fails to compile #343

code0100fun opened this issue May 15, 2023 · 4 comments

Comments

@code0100fun
Copy link

extism = { version = "0.3.0", path = "../../../rust", package = "extism" }

The relative path in the Cargo.toml assumes the dependency was being loaded from a relative location to the entire extism repo not the published elixir/ directory.

Steps to reproduce:

$ mix new test
$ cd test
$ vi mix.exs
<add {:extism, "~> 0.3.0"} dependency>
$ mix deps.get && mix compile
** (RuntimeError) calling `cargo metadata` failed.
$ vi deps/extism/native/extism_nif/Cargo.toml
<remove path = "../../../rust">
$ mix compile
<compiles successfully>
@bhelx
Copy link
Contributor

bhelx commented May 15, 2023

@code0100fun thanks for reporting, are you seeing this from the current package from hex.pm? This has popped up before, will try to come up with a fix this week.

@code0100fun
Copy link
Author

Yes, I'm seeing it in 0.3.0 which is the latest version on hex.pm.

@bhelx
Copy link
Contributor

bhelx commented May 15, 2023

Still working out the best overall fix for this over here: #345

But I submitted a manually fixed version on 0.3.2. When you get a chance, can you confirm it? you can bump in the mix.exs it and then do a mix deps.update extism and mix deps.compile extism

@code0100fun
Copy link
Author

Can confirm 0.3.2 fixed this issue for me. Thanks 👍

bhelx added a commit that referenced this issue May 16, 2023
Published this fix as 0.3.2: #343

going to disconnect this rust project for the time being. If we want to
publish a new elixir client with the new runtime then we must wait until
the runtime hit's crates.io
bhelx added a commit to extism/elixir-sdk that referenced this issue Sep 13, 2023
Published this fix as 0.3.2: extism/extism#343

going to disconnect this rust project for the time being. If we want to
publish a new elixir client with the new runtime then we must wait until
the runtime hit's crates.io
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants