Comments (7)
Hi Raul, thanks for submitting this issue ! I think what you're experiencing right here is the clunkiness of the current CLI of hacspec, which has been reported in #42. The PR #52 is working on fixing that, but in the meantime let's find a way to solve your problem.
It seems that the error that you get is cause by the fact that you're running cargo run
from outside of the language
directory of Hacspec. Could you try and re-run this command from the language
directory ?
from hacspec.
I ran from the language directory and now is giving me a different error:
"error[E0514]: found crate hacspec_lib
compiled by an incompatible version of rustc
--> /Users/raulmendiratta/Documents/Universidade/TESE/projects/hacspec_test/spec_test/src/main.rs:1:5
|
1 | use hacspec_lib::*;
| ^^^^^^^^^^^
|
= help: please recompile that crate using this compiler (rustc 1.49.0-nightly (ffa2e7ae8 2020-10-24))
= note: the following crate versions were found:
crate hacspec_lib
compiled by rustc 1.47.0 (18bf6b4f0 2020-10-07): /Users/raulmendiratta/Documents/Universidade/TESE/projects/hacspec_test/hacspec/target/debug/deps/libhacspec_lib-0cac07a3af93ca78.rmeta
crate hacspec_lib
compiled by rustc 1.47.0 (18bf6b4f0 2020-10-07): /Users/raulmendiratta/Documents/Universidade/TESE/projects/hacspec_test/hacspec/target/debug/deps/libhacspec_lib-0cac07a3af93ca78.rlib
crate hacspec_lib
compiled by rustc 1.47.0 (18bf6b4f0 2020-10-07): /Users/raulmendiratta/Documents/Universidade/TESE/projects/hacspec_test/spec_test/target/debug/deps/libhacspec_lib-fff1ebd6fac727a2.rmeta
crate hacspec_lib
compiled by rustc 1.47.0 (18bf6b4f0 2020-10-07): /Users/raulmendiratta/Documents/Universidade/TESE/projects/hacspec_test/spec_test/target/debug/deps/libhacspec_lib-fff1ebd6fac727a2.rlib
error: aborting due to previous error"
from hacspec.
Ok, wer're getting some progress. This problem is tied to the fact that the hacspec
compiler can only be run with nightly Rust. So to go past those messages, do cargo clean
inside the hacspec
directory, then run cargo build
in hacspec/language
. That should recompile hacspec_lib
using nightly and not stable Rust.
from hacspec.
It still gives me an error but now it seems it's only about two versions:
"error[E0514]: found crate hacspec_lib
compiled by an incompatible version of rustc
--> /Users/raulmendiratta/Documents/Universidade/TESE/projects/hacspec_test/spec_test/src/main.rs:1:5
|
1 | use hacspec_lib::*;
| ^^^^^^^^^^^
|
= help: please recompile that crate using this compiler (rustc 1.49.0-nightly (ffa2e7ae8 2020-10-24))
= note: the following crate versions were found:
crate hacspec_lib
compiled by rustc 1.47.0 (18bf6b4f0 2020-10-07): /Users/raulmendiratta/Documents/Universidade/TESE/projects/hacspec_test/spec_test/target/debug/deps/libhacspec_lib-fff1ebd6fac727a2.rmeta
crate hacspec_lib
compiled by rustc 1.47.0 (18bf6b4f0 2020-10-07): /Users/raulmendiratta/Documents/Universidade/TESE/projects/hacspec_test/spec_test/target/debug/deps/libhacspec_lib-fff1ebd6fac727a2.rlib
error: aborting due to previous error"
from hacspec.
That's because hacspec_test/spec_test
also contains a compiled version of hacspec_lib
. Go to hacspec_test/spec_test
and do cargo clean
, than cargo +nightly build
. Then go to hacspec/language
and do cargo clean
, then do cargo run ...
from hacspec.
The annoyance comes from interacting correctly with the Rust compiler and cargo
, which hacspec
does not do super well. #52 should improve that when it's merged.
from hacspec.
Ok it worked!! Thank you!! 👍
from hacspec.
Related Issues (20)
- Split ed25519 into two separate crates HOT 2
- Unable to use hacspec in edition 2021 crates
- Using consts from other module fails HOT 3
- Replace im
- Return Result type
- Allow skipping the enum type when using variants
- Implement unary negation for natural number
- ^ operation not available for type bool
- A sequence of sequences
- Importing from the same crate
- Empty Tuple struct, does not work
- Add F* to the CI
- Bad name resolution in the case of external re-exported module HOT 1
- Type the AST more precisely, to avoid `unwrap`s and `panic`s
- Add result let binding
- F* backend: variants are extracted to constructors whose payloads are tuples
- Outdated README
- Cleanup warnings
- implementation of from_be_bytes in math_integers is missing HOT 1
- syn 2 breaks the build HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hacspec.