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

build: Install toolchains #228

Closed
wants to merge 1 commit into from

Conversation

jarkkojs
Copy link
Collaborator

@jarkkojs jarkkojs commented Nov 23, 2024

Add toolchains to rust-toolchain.xml so that they don't need to be installed manually with rustup add component. This further simplifies the build, in addition to linker supplying the polkavm custom targets. Start with the minimal profile, and add only mandatory components for the build.

On a fresh Rust install, this will result:

$ cargo b
info: syncing channel updates for '1.75.0-aarch64-apple-darwin'
info: latest update on 2023-12-28, rust version 1.75.0 (82e1608df 2023-12-21)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-std'
info: downloading component 'rust-std' for 'wasm32-wasi'
info: downloading component 'rust-std' for 'x86_64-unknown-none'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-std'
info: installing component 'rust-std' for 'wasm32-wasi'
info: installing component 'rust-std' for 'x86_64-unknown-none'
info: installing component 'rustc'
info: installing component 'rustfmt'

Add toolchains to rust-toolchain.xml so that they don't need to be
installed manually with "rustup add component". This further simplifies the
build, in addition to linker supplying the polkavm custom targets. Start
with the minimal profile, and add only mandatory components for the build.

On a fresh Rust install, this will result:

$ cargo b
info: syncing channel updates for '1.75.0-aarch64-apple-darwin'
info: latest update on 2023-12-28, rust version 1.75.0 (82e1608df 2023-12-21)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-std'
info: downloading component 'rust-std' for 'wasm32-wasi'
info: downloading component 'rust-std' for 'x86_64-unknown-none'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-std'
info: installing component 'rust-std' for 'wasm32-wasi'
info: installing component 'rust-std' for 'x86_64-unknown-none'
info: installing component 'rustc'
info: installing component 'rustfmt'

Signed-off-by: Jarkko Sakkinen <[email protected]>
@koute
Copy link
Collaborator

koute commented Nov 23, 2024

Incorrect workspace; this should be in guest-program (if you want to add the targets for guest program benchmarks).

If you want to add targets for the ci scripts then these should be installed by the ci scripts, and not automatically (since the crates don't need these normally)

Also, we don't use the wasi target for WASM anywhere.

@jarkkojs
Copy link
Collaborator Author

OK fair enough! I'll close this one

@jarkkojs jarkkojs closed this Nov 24, 2024
@jarkkojs jarkkojs deleted the install-toolchains branch November 25, 2024 06:20
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

Successfully merging this pull request may close these issues.

2 participants