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

Detect custom rust version in the dir #17

Open
deuszx opened this issue May 17, 2023 · 1 comment
Open

Detect custom rust version in the dir #17

deuszx opened this issue May 17, 2023 · 1 comment

Comments

@deuszx
Copy link
Contributor

deuszx commented May 17, 2023

It's possible to specify a custom rust version via rust-toolchain file in the directory/project. For example in https://github.com/Cardinal-Cryptography/zk-apps, there's a rust-toolchain file which gest picked up:

~/aleph/zk-apps/shielder/contract$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/mateusz/.rustup

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu (default)
1.68-x86_64-unknown-linux-gnu
1.65.0-x86_64-unknown-linux-gnu
1.66.0-x86_64-unknown-linux-gnu

installed targets for active toolchain
--------------------------------------

wasm32-unknown-unknown
x86_64-unknown-linux-gnu

active toolchain
----------------

nightly-2022-11-28-x86_64-unknown-linux-gnu (overridden by '/home/mateusz/aleph/zk-apps/rust-toolchain')
rustc 1.67.0-nightly (1eb62b123 2022-11-27)

I think it makes sense to detect that and use the active toolchain as the default when running the tool. Unless user specifies otherwise.

In the example above, tool would set RUST_TOOLCHAIN=nightly-2022-11-28-x86_64-unknown-linux-gnu automatically.

@abhijeetbhagat
Copy link
Contributor

hi! we are awaiting cargo contract build --verifiable feature to be released. we'll add active toolchain detection then.

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