-
Notifications
You must be signed in to change notification settings - Fork 246
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
Enhance distribution channel #326
Comments
Going from nighty to the stable channel is a long ways off in part because the Rust folks are gating compiler internals that we depend critically on behind the unstable I agree that having downloadable release builds is worth looking into. Thanks for suggesting this to us! Happy to hear what platforms people are most interested in. |
This is becoming more acute now that in RIOT-OS/riotdocker#141 it's adding another half-hour-or-so to the RIOT build system. (For this particular use case, working from the built docker files may be a simpler shortcut.) AIU there are already some builds done in CI, but a) they're debug builds, and b) the builds don't become part of the artifacts. Would it be sufficient to set the build to release (again, probably, as the first |
Looks like at least for the concrete use case at hand indeed the Docker images are good enough -- if they are recent. @thedataking, could you upload the |
I've mistaken the immunant/c2rust images for containers that include c2rust, whereas they actually contain the build environment for c2rust (and thus doesn't need an update for the 2020-04 version can still compile c2rust). For the RIOT use case we'll probably build an own image that contains pending PRs (#302, #311), but the script is really easy (especially in the form I tested earlier before pulling in the PR branch):
I'm not sure how useful this is on its own, given it has an "ancient" Rust version installed; current usage in the RIOT PR is as
|
I've uploaded the Docker image with already built @chrysn maybe will be a good idea at least to mention it somewhere. I think this Docker image can be helpful to someone.
|
For those considering Debian-style packages for c2rust (not likely going to happen in Debian unless it builds on stable, but that doesn't keep anyone from building .deb or hosting files): The branch referenced in RIOT-OS/riotdocker#173 (or its master branch once merged) contains, in its c2rust-built directory, a debian directory with which it is relatively straightforward to build c2rust .deb packages. These are easy to distribute and ensure (using the shlibdeps mechanism) that the required llvm libraries are always present. (It's still also a Docker container built on Ubuntu 20.04 LTS, and the image contains packages for that). (Anyone looking at this from a Debian PoV: they wouldn't cut it in the archive, among other things because they depend on an unpackaged Rust nightly -- and therefore also don't use dh-cargo, because that appears not to be cut for non-distro rustc versions) |
With 0.16 out this has drastically improved; I'm in the process of updating the referenced Debian package, and somewhere down the road this could become well eligible for inclusion in distributions. But maybe now this is also becoming less important: rather than installing c2rust as a binary, c2rust-transpile could also be used more like a library, making the dependency visible to cargo at build time rather than requiring the user to explicitly |
As you noted, this is fixed in |
|
Getting c2rust is, by Rust standards, comparatively hard to install, as it requires a particular nightly Rust, and even then, occasional workarounds.
If at some point the particular-nightly dependency is dropped, not only would
cargo install
work, but also all optimizations based on it (like cargo-quickinstall) would work.Until then, could you establish release builds that are downloadable at least for the most common platform(s)? In particular, not having to build c2rust inside the CI of any project that needs it would be quite helpful.
The text was updated successfully, but these errors were encountered: