Skip to content

Conversation

@RyanGlScott
Copy link
Contributor

@RyanGlScott RyanGlScott commented Mar 7, 2025

This merges the commit history of crucible's crux-mir/lib directory (which contains the modified versions of the Rust standard libraries that mir-json uses) and crux-mir/translate_libs.sh script (which compiles the standard libraries using mir-json) into the mir-json repo. I have rewritten the commit history to locate these at libs/ and translate_libs.sh, respectively. I performed this commit rewrite using the following git-filter-repo invocation:

$ git-filter-repo --path crux-mir/lib --path-rename crux-mir/lib:libs --path crux-mir/translate_libs.sh --path-rename crux-mir/translate_libs.sh:translate_libs.sh --refs refs/heads/filter-source --force

Only the two last commits in this PR updates are of real interest to reviewers (all other commits are churn induced by moving files from crucible over to this repo.):

  • The second-to-last commit updates the mir-json documentation to describe libs/ and translate_libs.sh.
  • The last commit updates the CI to call translate_libs.sh and package up the results in the uploaded artifacts.

This is one half of a fix for GaloisInc/crucible#1252.

@RyanGlScott RyanGlScott force-pushed the crucible-T1252-merge-std-libs branch from 181402b to 3f91f8c Compare March 7, 2025 19:17
RyanGlScott added a commit to GaloisInc/crucible that referenced this pull request Mar 7, 2025
These have been moved to `mir-json` as part of
GaloisInc/mir-json#85.

Towards #1252
RyanGlScott added a commit to GaloisInc/crucible that referenced this pull request Mar 7, 2025
…gration

Now that the `mir-json`-specific versions of the Rust standard libraries have
been moved to the `mir-json` repo (in
GaloisInc/mir-json#85), this patch adjusts the various
references to the standard libraries to ensure that `crux-mir`'s documentation
and CI remain up to date.

Towards #1252
@spernsteiner
Copy link
Collaborator

I'm a little skeptical about this move - I think the patches to the libraries are more closely tied to what crucible-mir can handle than to anything in mir-json. When trying to get a new library feature working in crux-mir, IIRC it was common to do some parts as library patches and some parts as new crucible-mir intrinsics/overrides, but it was very rare to need to change mir-json.

@RyanGlScott
Copy link
Contributor Author

RyanGlScott commented Mar 7, 2025

Per GaloisInc/crucible#1252 (comment), I'm not a fan of housing the libraries under crux-mir, as I don't think this location makes sense now that the libraries are used by multiple tools (crux-mir and SAW). Moreover, as noted in GaloisInc/crucible#1252 (comment), putting the libraries in the mir-json repo has the secondary benefit of streamlining installation for users, as mir-json needs to have a standard library installation present in order to be useful. (It also greatly simplifies the CI and Docker stories, although those are less convincing arguments.)

While I could be convinced to house the files somewhere besides mir-json, I really don't think that they should be under crux-mir/lib. Do you have an alternative suggestion?

RyanGlScott added a commit to GaloisInc/crucible that referenced this pull request Mar 10, 2025
These have been moved to `mir-json` as part of
GaloisInc/mir-json#85.

Towards #1252
RyanGlScott added a commit to GaloisInc/crucible that referenced this pull request Mar 10, 2025
…rd library migration

Now that the `mir-json`-specific versions of the Rust standard libraries have
been moved to the `mir-json` repo (in
GaloisInc/mir-json#85), this patch adjusts the various
references to the standard libraries to ensure that `crux-mir`'s documentation,
CI, and test suite remain up to date.

Towards #1252
RyanGlScott added a commit to GaloisInc/crucible that referenced this pull request Mar 10, 2025
…rd library migration

Now that the `mir-json`-specific versions of the Rust standard libraries have
been moved to the `mir-json` repo (in
GaloisInc/mir-json#85), this patch adjusts the various
references to the standard libraries to ensure that `crux-mir`'s documentation,
CI, and test suite remain up to date.

Towards #1252
RyanGlScott added a commit to GaloisInc/saw-script that referenced this pull request Mar 10, 2025
Now that the `mir-json`-specific versions of the Rust standard libraries have
been moved to the `mir-json` repo (in GaloisInc/mir-json#85 and
GaloisInc/crucible#1319), this patch adjusts the various references to the
standard libraries to ensure that SAW's documentation, CI, and test suite
remain up to date.
RyanGlScott added a commit to GaloisInc/saw-script that referenced this pull request Mar 10, 2025
Now that the `mir-json`-specific versions of the Rust standard libraries have
been moved to the `mir-json` repo (in GaloisInc/mir-json#85 and
GaloisInc/crucible#1319), this patch adjusts the various references to the
standard libraries to ensure that SAW's documentation, CI, and test suite
remain up to date.
@RyanGlScott
Copy link
Contributor Author

I spoke to @spernsteiner offline about this, and we came to an agreement to proceed with the plan in this PR. There are tradeoffs regardless of which repo we house these standard libraries in (for instance, housing them in mir-json has the disadvantage of coupling mir-json and crucible-mir development a bit more tightly), but I do think the pros outweigh the cons.

RyanGlScott added a commit to GaloisInc/crucible that referenced this pull request Mar 12, 2025
…rd library migration

Now that the `mir-json`-specific versions of the Rust standard libraries have
been moved to the `mir-json` repo (in
GaloisInc/mir-json#85), this patch adjusts the various
references to the standard libraries to ensure that `crux-mir`'s documentation,
CI, and test suite remain up to date.

Towards #1252
@RyanGlScott RyanGlScott marked this pull request as ready for review March 26, 2025 16:29
RyanGlScott added a commit to GaloisInc/crucible that referenced this pull request Mar 26, 2025
These have been moved to `mir-json` as part of
GaloisInc/mir-json#85.

Towards #1252
RyanGlScott added a commit to GaloisInc/crucible that referenced this pull request Mar 26, 2025
…rd library migration

Now that the `mir-json`-specific versions of the Rust standard libraries have
been moved to the `mir-json` repo (in
GaloisInc/mir-json#85), this patch adjusts the various
references to the standard libraries to ensure that `crux-mir`'s documentation,
CI, and test suite remain up to date.

Towards #1252
RyanGlScott added a commit to GaloisInc/saw-script that referenced this pull request Mar 26, 2025
Now that the `mir-json`-specific versions of the Rust standard libraries have
been moved to the `mir-json` repo (in GaloisInc/mir-json#85 and
GaloisInc/crucible#1319), this patch adjusts the various references to the
standard libraries to ensure that SAW's documentation, CI, and test suite
remain up to date.
We don't currently specify what happens if both `CRUX_RUST_LIBRARY_PATH` and
`SAW_RUST_LIBRARY_PATH` are defined but set to different values (in reality,
`CRUX_RUST_LIBRARY_PATH` always takes precedence), but people might think that
they can use different paths for Crux and SAW. So maybe we should just say "one
of".
@RyanGlScott RyanGlScott merged commit 5b7cda1 into master Mar 27, 2025
3 checks passed
@RyanGlScott RyanGlScott deleted the crucible-T1252-merge-std-libs branch March 27, 2025 17:56
RyanGlScott added a commit to GaloisInc/crucible that referenced this pull request Mar 27, 2025
These have been moved to `mir-json` as part of
GaloisInc/mir-json#85.

Towards #1252
RyanGlScott added a commit to GaloisInc/crucible that referenced this pull request Mar 27, 2025
…rd library migration

Now that the `mir-json`-specific versions of the Rust standard libraries have
been moved to the `mir-json` repo (in
GaloisInc/mir-json#85), this patch adjusts the various
references to the standard libraries to ensure that `crux-mir`'s documentation,
CI, and test suite remain up to date.

Towards #1252
RyanGlScott added a commit to GaloisInc/saw-script that referenced this pull request Mar 27, 2025
Now that the `mir-json`-specific versions of the Rust standard libraries have
been moved to the `mir-json` repo (in GaloisInc/mir-json#85 and
GaloisInc/crucible#1319), this patch adjusts the various references to the
standard libraries to ensure that SAW's documentation, CI, and test suite
remain up to date.
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.

7 participants