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

Maintain modified Rust standard libraries and translate_libs.sh in a separate repo #1252

Open
RyanGlScott opened this issue Sep 9, 2024 · 3 comments
Labels
MIR Issues relating to Rust/MIR support technical debt

Comments

@RyanGlScott
Copy link
Contributor

Currently, we vendor in our modified copies of the Rust standard libraries (as well as the associated translate_libs.sh script, which runs mir-json on these modified standard libraries to compile them) as a subdirectory in crux-mir. Historically, this made sense, as crux-mir was the sole consumer of these files. It is unclear if this arrangement makes as much sense nowadays, however, for the following reasons:

  1. Both crux-mir and SAW (the latter of which now has a MIR backend) need to make use of translate_libs.sh. Telling SAW users to download crux-mir for the sole purpose of running translate_libs.sh doesn't make much sense, given that crux-mir is otherwise unrelated to SAW.
  2. The vendored-in copies of the Rust standard libraries are actually quite large (on the order of several megabytes), which substantially increases the amount of time it takes to clone the crucible repo. This is a bit of a shame, considering that many crucible developers aren't going to be using the MIR-related parts.

To address both of these concerns, I propose that we factor out the modified Rust standard libraries (and translate_libs.sh) into a separate repo. I'll tentatively call this repo "mir-json-libs" until I can think of something better. That way, mir-json-libs development can live outside of crucible (thereby avoiding further bloating of the crucible repo), and there is now a central location for further standard library modifications needed to support crux-mir and SAW.

@RyanGlScott RyanGlScott added technical debt MIR Issues relating to Rust/MIR support labels Sep 9, 2024
@sauclovian-g
Copy link
Contributor

Won't it still need to be a submodule of crucible (or at least want to be, for the same reasons we just added mir-json in saw)? That kind of defeats point 2. Not that this matters, since point 1 is ample reason to do this :-)

@RyanGlScott
Copy link
Contributor Author

Won't it still need to be a submodule of crucible (or at least want to be, for the same reasons we just added mir-json in saw)? That kind of defeats point 2.

Yes, that is fair. Let me revise point (2), then: one disadvantage of versioning the crux-mir standard libraries in the same repo as crucible is that the git history for the crux-mir standard libraries is very large and messy, and it would be better to keep it as separate as possible. (For an example of what I'm taking about, check out the sheer number of commits from the last time we updated these standard libraries: GaloisInc/mir-json#49)

@sauclovian-g
Copy link
Contributor

Oof. point taken 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MIR Issues relating to Rust/MIR support technical debt
Projects
None yet
Development

No branches or pull requests

2 participants