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

Add Docker image #83

Merged
merged 4 commits into from
Mar 31, 2025
Merged

Add Docker image #83

merged 4 commits into from
Mar 31, 2025

Conversation

RyanGlScott
Copy link
Contributor

Fixes #71.

@RyanGlScott
Copy link
Contributor Author

RyanGlScott commented Mar 4, 2025

I have verified that this image builds locally and runs as you would expect it to. Some things left to do:

  • This image does not build our forked versions of the Rust standard libraries (currently housed here). After some thought, I think this is fine. The plan in Maintain modified Rust standard libraries and translate_libs.sh in a separate repo crucible#1252 is to move this code to its own repo, and once we do that, we can provide a separate Docker image that includes the compiled versions of the forked standard libraries.
  • We should build this image as part of CI and push it to the GitHub Container Registry (ghcr.io). For now, I think it will suffice to do this on each commit to the master branch (where the image is tagged with nightly), as well as on each time a git tag is pushed (where the image is tagged with the name of the git tag).
  • We should advertise this image in the mir-json README.

@spernsteiner
Copy link
Collaborator

This image does not build our forked versions of the Rust standard libraries

Is mir-json usable for anything without those libraries? Even #[no_std] code is going to need libcore, and using the standard libcore (e.g. cargo saw-build -Zbuild-std=core) would be pretty severely broken (IIRC even some basic slice operations are patched in our fork).

@RyanGlScott
Copy link
Contributor Author

Is mir-json usable for anything without those libraries?

No, not really. (And especially so after #67 is fixed.)

I suppose there is a question of whether we want the mir-json repo to house a dev image that provides nothing but mir-json, for which the repo that houses the fork of the Rust standard libraries could use to build its own image. Alternatively, we could not offer an image in the mir-json repo at all and instead provide an image in the other repo that includes all of mir-json + the forked standard libraries. I don't have a particularly strong opinion on how we do it.

Yet another alternative would be to move the forked standard libraries into this repo so that both them and mir-json are all under the same repo.

@spernsteiner
Copy link
Collaborator

I have no real preference, except that I don't think we should advertise an image to users that they can't actually use for anything

@RyanGlScott
Copy link
Contributor Author

I have rebased this on top of the changes from GaloisInc/crucible#1252, and I have updated the Docker image to include the translated standard libraries. Next up: a CI job.

@RyanGlScott RyanGlScott marked this pull request as ready for review March 28, 2025 18:17
Co-authored-by: Bretton <[email protected]>
Copy link
Collaborator

@qsctr qsctr left a comment

Choose a reason for hiding this comment

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

I am not a CI expert but this looks ok to me

@RyanGlScott RyanGlScott merged commit 543d45f into master Mar 31, 2025
5 checks passed
@RyanGlScott RyanGlScott deleted the T71-docker branch March 31, 2025 09:48
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.

Provide Docker image
3 participants