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 rumprun CI #76

Closed
alexcrichton opened this issue Nov 25, 2015 · 5 comments
Closed

Add rumprun CI #76

alexcrichton opened this issue Nov 25, 2015 · 5 comments

Comments

@alexcrichton
Copy link
Member

It looks like the rumprun target for the compiler is pretty cool, can we add CI for it to make sure the bindings here are correct? There's a few steps to this:

  • The CI needs to be able to get a Rust compiler that can target rumprun. This should be relatively easy, however, as we can just pin to a particular nightly and upload the target libraries (e.g. what iOS does today).
  • CI needs to be able to run the resulting binary, but if I understand rumprun correctly that should in theory be possible through just using qemu?

cc @gandro

@gandro
Copy link
Contributor

gandro commented Nov 26, 2015

Yes, I would like to see that as well. Note that the new version (0.2) of the libc crate doesn't contain the Rumprun patches from rust-lang/rust#28543. I haven't found the time to port them yet.

Since Rumprun uses NetBSD's libc (and the libc crate shares all the code), testing Rumprun also means testing NetBSD and vice versa. Therefore, I also see two alternatives to running a Rumprun binary inside qemu:

  • Run the binary inside qemu on an automated NetBSD installation, using anita. This would conceptually not be much different from running Rumprun in qemu. Both approaches probably require scraping the console output to determine if the test ran successfully.
  • Cross-compile and run a frankenlibc binary on directly on Linux. frankenlibc is rump unikernel that can run in POSIX userspace. Like Rumprun, it also builds upon NetBSD's libc, so it would also cover the same code. We could use it to build a Linux binary that links against frankenlibc (which is mostly equivalent to NetBSD's libc) and just run that one for testing. However, Rust would need to be ported to frankenlibc (probably not too difficult).

@steveklabnik
Copy link
Member

I would love to see this happen.

@gandro I did submit patches to get rumprun running at some point... or maybe it was just fixing the build on stable rust so a release could get cut. Hm.

@gandro
Copy link
Contributor

gandro commented Nov 26, 2015

@steveklabnik

@gandro I did submit patches to get rumprun running at some point... or maybe it was just fixing the build on stable rust so a release could get cut. Hm.

AFAIR that was for the last v0.1.x release. The NetBSD/Rumprun changes never ended up in the refactored (v0.2.0) version of this crate, since my patches landed around the same time RFC1291 was proposed. But no worries, I started working on re-adding NetBSD/Rumprun support for the libc crate and will issue a PR, but I ran out of time for today.

@alexcrichton

This should be relatively easy, however, as we can just pin to a particular nightly and upload the target libraries (e.g. what iOS does today).

I'm wondering if we somehow could also provide these pre-compiled target libraries to all users, since building Rust for Rumprun is quite a hassle (especially on OS X). Are there dedicated buildbots for such things? I would gladly help out.

@alexcrichton
Copy link
Member Author

@gandro

We don't currently have dedicated bots for building rumprun (like we're building arm/mips linux today), but I'd be willing to set some up! Other than that we can just build one set of libraries and pin to a nightly version of Rust for CI in libc.

I actually explored this over the thanksgiving break and I have a branch with rumprun CI but I'd like to re-verify definitions on OpenBSD, NetBSD, and ideally Bitrig before merging as lots of movement happened.

@alexcrichton
Copy link
Member Author

Added in #86

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

No branches or pull requests

3 participants