Skip to content

rust: Update rust crates #1588

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

Closed
wants to merge 1 commit into from
Closed

rust: Update rust crates #1588

wants to merge 1 commit into from

Conversation

ac000
Copy link
Member

@ac000 ac000 commented Apr 7, 2025

    rust: Update rust crates
    
    Update (cargo update) the rust crates for wasm-wasi-component, otel &
    unitctl.
    
    This will fix build issues with wasm-wasi-component & rustc 1.86+.
    It will also fix dependabot issues in otel and unitctl.
    
    Link: <https://github.com/bytecodealliance/wasmtime/issues/10184>
    Link: <https://github.com/nginx/unit/pull/1585>
    Link: <https://github.com/nginx/unit/pull/1589>
    Link: <https://github.com/nginx/unit/pull/1570>
    Signed-off-by: Andrew Clayton <[email protected]>

@ac000 ac000 marked this pull request as ready for review April 7, 2025 23:55
@ac000 ac000 requested a review from avahahn April 7, 2025 23:55
Update (cargo update) the rust crates for wasm-wasi-component, otel &
unitctl.

This will fix build issues with wasm-wasi-component & rustc 1.86+.
It will also fix dependabot issues in otel and unitctl.

Link: <bytecodealliance/wasmtime#10184>
Link: <nginx#1585>
Link: <nginx#1589>
Link: <nginx#1570>
Signed-off-by: Andrew Clayton <[email protected]>
@ac000
Copy link
Member Author

ac000 commented Apr 8, 2025

  • Add another dependabot PR link
$ git range-diff f9440ac3...f2e97bf3
1:  f9440ac3 ! 1:  f2e97bf3 rust: Update rust crates
    @@ Commit message
     
         Link: <https://github.com/bytecodealliance/wasmtime/issues/10184>
         Link: <https://github.com/nginx/unit/pull/1585>
    +    Link: <https://github.com/nginx/unit/pull/1589>
         Link: <https://github.com/nginx/unit/pull/1570>
         Signed-off-by: Andrew Clayton <[email protected]>
     

@thresheek
Copy link
Member

Yeah, looks like we're hitting the exact issue on homebrew that has a newer Rust version: https://github.com/nginx/homebrew-unit/actions/runs/14298398297/job/40216705842

Also, this will make us depend on Rust 1.83+ afaict...

@ac000
Copy link
Member Author

ac000 commented Apr 9, 2025

Such is rust life...

@ac000
Copy link
Member Author

ac000 commented Apr 9, 2025

And now this is also failing... fsck... remind me again who said rust was a good idea?!

@thresheek Feel free the approve this PR!

@ac000
Copy link
Member Author

ac000 commented Apr 9, 2025

Although this new failure is from building wasmtime from source... is it bundling an old version of the problematic crate?
Not to emntion there's a bunch of other warnings when building it.

Either way, not sure why we're bothering to build it from source here...

@ac000
Copy link
Member Author

ac000 commented Apr 9, 2025

Seeing if bumping wasmtime to 31.0.0 in pkg/contrib fixes things...

@thresheek
Copy link
Member

I think we need to bump wasmtime in both pkg/contrib and src/wasm-wasi-component/Cargo.toml stuff - since https://github.com/nginx/unit/actions/runs/14362591784/job/40267665156?pr=1591 fails the similar way

That said, maybe other crates need a bump in Cargo.toml too.

@ac000
Copy link
Member Author

ac000 commented Apr 9, 2025

Indeed, building wasmtime 31.0.0 is warning and error free...

@ac000
Copy link
Member Author

ac000 commented Apr 9, 2025

I think we need to bump wasmtime in both pkg/contrib and src/wasm-wasi-component/Cargo.toml stuff - since https://github.com/nginx/unit/actions/runs/14362591784/job/40267665156?pr=1591 fails the similar way

That said, maybe other crates need a bump in Cargo.toml too.

This PR updates all crates in src/wasm-wasi-component, src/otel and tools/unitctl.

This PR bumps pkg/contrib/src/wasmtime to 31.0.0

@ac000
Copy link
Member Author

ac000 commented Apr 9, 2025

Note: The important bit to update was wit-parser, wasmtime must come with it bundled.

@ac000
Copy link
Member Author

ac000 commented Apr 9, 2025

However, while this PR obviously fixes the wasm-wasi-component build, I'm not sure why the wasm test isn't failing with the wamtime build, which while having the compilation warnings doesn't have the compilation error that we are now seeing elsewhere... strange... anyway between this and the other PR it should be all good...

@thresheek
Copy link
Member

I think the ubuntu-latest runners just had a software bump, which probably explains what we've been seeing:

E.g. https://github.com/nginx/unit/actions/runs/14362591784/job/40267664555?pr=1591 was picked up by:

  Image: ubuntu-24.04
  Version: 20250406.1.0
  Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20250406.1/images/ubuntu/Ubuntu2404-Readme.md

Which seems to have Rust 1.86.0

While https://github.com/nginx/unit/actions/runs/14335337085/job/40180839867?pr=1588 was picked up by an older version:

  Image: ubuntu-24.04
  Version: 20250323.1.0
  Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20250323.1/images/ubuntu/Ubuntu2404-Readme.md

Which had Rust 1.85.1.

@thresheek
Copy link
Member

Err, wrong first job URL, but I think that doesnt really matter much.

@thresheek thresheek self-requested a review April 9, 2025 18:17
@ac000 ac000 closed this Apr 9, 2025
@ac000 ac000 deleted the cargo-update branch April 9, 2025 21:31
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