HigherOrderCO / HVM

A massively parallel, optimal functional runtime in Rust

Home Page:https://higherorderco.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Attempting to `cargo install --path .` for the Summation.hvm example from the HVM guide readme fails

bishboria opened this issue · comments

I followed the installation instructions in HVM/guide/README.md, and created the summation.hvm file.

In the Compiling A Program section, when trying to run cargo install --path . I get the following errors:

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> src/lib.rs:1:12
  |
1 | #![feature(atomic_from_mut)]
  |            ^^^^^^^^^^^^^^^

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> src/lib.rs:2:12
  |
2 | #![feature(atomic_mut_ptr)]
  |            ^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0554`.

I'm currently running hvm 1.0.13-beta, and did use the nightly options when setting up rust and cargo.
My OS: MacOS 12.6.1.

I also had this problem and got around it by using a "rust-toolchain.toml" file with these contents in the root of the project. Maybe see if it work for you as well?

@nothingnesses yes that workaround helps, cargo install works and running the summation executable works too. Thanks.

Is there a different setting that should be used to ensure nightly is the correct channel chosen, rather than having to manually tweak settings?

I created a PR that should address this, please feel free to try it and confirm if it works for you.

I uninstalled the old set up to start fresh. Where does cargo put the HVM repo? I need to check out the PR branch and try it out :)

@bishboria you should be able to install HVM from @nothingnesses's fork like this:

cargo +nightly install --git https://github.com/nothingnesses/LambdaVM-Rust.git --branch jia/#185

@zicklag Thanks.

Can confirm that @nothingnesses' PR works. Cheers!