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

Use nightly again to build wasm artifacts #16540

Draft
wants to merge 12 commits into
base: dw/revamp-use-latest-master-proof-systems
Choose a base branch
from

Conversation

dannywillems
Copy link
Member

@dannywillems dannywillems commented Jan 28, 2025

This is built on top of #16464

nightly has been initially removed as it seemed to make vendoring all the
dependencies more complicated (which seems to not be the case though).
However, removing nightly introduces issues like "DataCloneError", see
o1-labs/o1js#1989, which makes the reliance on
nightly inevitable.

When using wasm-pack with --offline, we get the following error:

error: no matching package named `compiler_builtins` found
location searched: registry `crates-io`
required by package `std v0.0.0 (/home/opam/.rustup/toolchains/nightly-2023-09-18-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std)`
As a reminder, you're using offline mode (--offline) which can sometimes cause surprising resolution failures, if this error is too confusing you may wish to retry without the offline flag.

I would leave it like this for now, hoping that wasm-pack uses Cargo.lock.

Related o1js and o1js-bindings PR:

@dannywillems dannywillems requested a review from a team as a code owner January 28, 2025 10:00
@dannywillems dannywillems marked this pull request as draft January 28, 2025 10:02
@dannywillems dannywillems force-pushed the dw/back-on-nightly-for-wasm branch 2 times, most recently from 6e8c1b0 to 3d2484c Compare January 28, 2025 10:12
@dannywillems
Copy link
Member Author

!ci-build-me

@dannywillems dannywillems force-pushed the dw/back-on-nightly-for-wasm branch from 3d2484c to 02241d8 Compare January 28, 2025 11:37
@dannywillems
Copy link
Member Author

!ci-toolchain-me

1 similar comment
@dkijania
Copy link
Member

!ci-toolchain-me

@dannywillems
Copy link
Member Author

!ci-build-me

nightly has been initially removed as it seemed to make vendoring all the
dependencies more complicated because some std lib must be included.
However, removing nightly introduces issues like "DataCloneError", see
o1-labs/o1js#1989, which makes the reliance on
nightly inevitable.
Removing --offline because stdlib missing for now (like `compiler_builtins`).

Another note is that cargo vendor has been introduced to provide a
consistent build environment for all platforms and all users, including
the CI. The lockfile Cargo.lock is meant to provide a locked environment
with all the dependencies, including the transitive ones. However, it is
only used by binaries. In our build process, we do build a static
library (libwires_15_stubs.a), not a binary. And Rust doesn't use the
lockfile in this case.
Another solution than `cargo vendor` would have been to strictly enforce
the version in the top-level Cargo.toml, but it implies to add all the
transitive dependencies (as otherwise, when a new transitive dependency
is released, cargo will fetch it, making the environment inconsistent).
This solution is not viable as the purpose of Cargo.toml is to enforce
versions on direct dependencies only, and leave the cargo solver doing
its job for the transitive dependencies.
For these reasons, the solution of vendoring the dependencies to build
the static library has been selected.
@dannywillems dannywillems force-pushed the dw/back-on-nightly-for-wasm branch from 1ba80c6 to 215c7c8 Compare January 28, 2025 12:57
@dannywillems dannywillems force-pushed the dw/back-on-nightly-for-wasm branch from 215c7c8 to b2ba551 Compare January 28, 2025 12:59
@dannywillems
Copy link
Member Author

!ci-build-me

1 similar comment
@dannywillems
Copy link
Member Author

!ci-build-me

wasm should not use vendor
@dannywillems dannywillems force-pushed the dw/back-on-nightly-for-wasm branch from c0c0f04 to 0ab8103 Compare January 28, 2025 13:58
@dannywillems
Copy link
Member Author

!ci-build-me

@dannywillems
Copy link
Member Author

!ci-build-me

@dannywillems dannywillems force-pushed the dw/back-on-nightly-for-wasm branch from b133689 to 7d5f961 Compare January 28, 2025 14:42
@svv232 svv232 changed the title Use nightly again to build wasm artefacts Use nightly again to build wasm artifacts Feb 4, 2025
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