Skip to content

Ideas for getting the rust-toolchain-bin builds working #4

@mitchmindtree

Description

@mitchmindtree

While working at #3 and getting a from-source toolchain working would help to enable easier patching of risc0 source for better compatibility with the nix sandbox, it's worth considering how the existing rust binaries could be tweaked to get them working.

Currently, the major blocker is that when doing a simple cargo run of the template example, the tool attempts to detect the risc0 toolchain using rustup.

https://github.com/risc0/risc0/blob/1866e2a1cce4fbfa3596a49818fed03c8c869044/risc0/build/src/lib.rs#L687-L707

This is an issue because:

  1. We don't use rustup to install the toolchain and
  2. We don't have rustup installed anyway.

We could potentially resolve this by using makeWrapper to wrap the binaries with a dummy rustup path that returns the expected values, and use a symlink to the store at the expected installation location.

This is only really valid for the last stable release of their rust toolchain (1.85.0) as it looks like the behaviour has changed significantly since then to instead revolve around their rzup tool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions