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

Easier WASI setup #31

Merged
merged 3 commits into from
Sep 30, 2024
Merged

Easier WASI setup #31

merged 3 commits into from
Sep 30, 2024

Conversation

ethanfrey
Copy link
Contributor

Builds on #26 but moves the setup and build instructions into easy scripts. Also assert the MSRV there, as a fellow (frontend) dev hit odd issues with a very old Rust version.

Setup seems to work.

The build script fails due to some issue in the code configuration I think. That is ./scripts/build_wasi.sh as well as cd wasi/square/ && cargo component build --release provides:

error: component registry package `lay3r:avs` (v`0.3.0`) has digest `sha256:891753e8eab23c067ef8095359c28e4296a65faf416103e797f468dcb5f6b4a5` but the lock file specifies digest `sha256:5ca2842d9fbc411429870dfe3b69cb6f787f7cea30598518849cf2edf03c7ce2`

@ethanfrey ethanfrey requested a review from calvinrp September 30, 2024 12:11
@calvinrp
Copy link
Collaborator

Builds on #26 but moves the setup and build instructions into easy scripts. Also assert the MSRV there, as a fellow (frontend) dev hit odd issues with a very old Rust version.

Setup seems to work.

The build script fails due to some issue in the code configuration I think. That is ./scripts/build_wasi.sh as well as cd wasi/square/ && cargo component build --release provides:

error: component registry package `lay3r:avs` (v`0.3.0`) has digest `sha256:891753e8eab23c067ef8095359c28e4296a65faf416103e797f468dcb5f6b4a5` but the lock file specifies digest `sha256:5ca2842d9fbc411429870dfe3b69cb6f787f7cea30598518849cf2edf03c7ce2`

Investigating. I was switching my local config between test and prod registry that had different SHAs.

@ethanfrey
Copy link
Contributor Author

Make sense. Can you also add docs on how to pull from a registry (and push there)? Maybe pushing elsewhere, in internal docs, but at least getting latest from registry here

@calvinrp
Copy link
Collaborator

calvinrp commented Sep 30, 2024

Make sense. Can you also add docs on how to pull from a registry (and push there)? Maybe pushing elsewhere, in internal docs, but at least getting latest from registry here

Will do today. The registry config for a project should really be committed to the workspace in the repo, instead of global config. It was there in cargo-component but got refactored in the switch to support both Warg and OCI registries. Likely I could get this fixed in the next release of cargo-component (this week I think).

It would drastically simplify the setup instructions for the hackathon devs.

@calvinrp
Copy link
Collaborator

I forgot that cargo-component has a cache dir in addition to wkg and warg. Created an issue to make it easier to clear that cache, at the very least.

This is an unlikely edge case for the hackathon. Only would occur if you are switching around registry config in weird ways, like I was.

Copy link
Collaborator

@calvinrp calvinrp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the simpler setup is available, we can revise with a follow up PR.

@calvinrp calvinrp merged commit 0472008 into main Sep 30, 2024
2 checks passed
@calvinrp calvinrp deleted the wasi_setup branch September 30, 2024 14:41
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