Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd support for the rumprun unikernel #28593
Conversation
rust-highfive
assigned
nrc
Sep 22, 2015
This comment has been minimized.
This comment has been minimized.
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nrc (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
This comment has been minimized.
This comment has been minimized.
rust-highfive
assigned
alexcrichton
and unassigned
nrc
Sep 22, 2015
alexcrichton
reviewed
Sep 22, 2015
| @@ -53,6 +53,7 @@ pub fn opts() -> TargetOptions { | |||
| exe_suffix: ".exe".to_string(), | |||
| staticlib_prefix: "".to_string(), | |||
| staticlib_suffix: ".lib".to_string(), | |||
| no_default_libraries: false, | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
gandro
Sep 22, 2015
Author
Contributor
The rumprun linker wrapper uses a GCC spec file to add a path to the rumprun version of system libraries (libc, libpthread etc). If -nodefaultlibs is specified, gcc will not use specified the path.
Maybe @mato has more insight to this, he helped me debug the issue.
This comment has been minimized.
This comment has been minimized.
gandro
Sep 26, 2015
Author
Contributor
Oh. I completely missed that fact that this is a Windows target. This has nothing to do with rumprun, I will remove it. Sorry about that.
This slipped in from my previous patch. I ommited it in the final version, because the mvc linker doesn't include default libraries anyway.
This comment has been minimized.
This comment has been minimized.
|
Thanks! Pretty neat seeing Rust run on all these new platforms! Is |
This comment has been minimized.
This comment has been minimized.
|
Yes, x86_64-rumprun-netbsd is the official target, also used for cross-compiling C programs. There was a thread on the gcc mailing list about the rationale behind this triple: https://gcc.gnu.org/ml/gcc/2015-03/msg00350.html ( Follow up: https://gcc.gnu.org/ml/gcc/2015-04/msg00033.html ) In the future, rumprun might offer other ABIs than NetBSDs, this is why conditional compilation always checks for both, |
This comment has been minimized.
This comment has been minimized.
|
Exciting platform. What are your ambitions for Rust rump kernels? Any solid plans yet? |
This comment has been minimized.
This comment has been minimized.
|
hm, let's be wary of making What is |
This comment has been minimized.
This comment has been minimized.
anttikantee
commented
Sep 23, 2015
|
On 23/09/15 00:39, Brian Anderson wrote:
I hope you do not mind me interjecting as the Cerberus for nomenclature. A rump kernel is built from [monolithic] kernel driver components with With that out the way, the question about intersection points between |
This comment has been minimized.
This comment has been minimized.
|
@brson I can add I can give |
This comment has been minimized.
This comment has been minimized.
I took this name from LLVM's Yeah |
gandro
referenced this pull request
Sep 24, 2015
Merged
rustc: Add target_vendor for target triples #28612
This comment has been minimized.
This comment has been minimized.
|
I will rebase this to use |
bors
added a commit
that referenced
this pull request
Sep 26, 2015
gandro
force-pushed the
gandro:rumprun
branch
from
78234eb
to
c099cfa
Sep 26, 2015
This comment has been minimized.
This comment has been minimized.
|
Rebased to use |
gandro commentedSep 22, 2015
This adds a new target,
x86_64-rumprun-netbsd, and related changes tostd.Rumprun is a unikernel platform that provides a POSIX-y interface. For the most part, rumprun uses NetBSD's libc and drivers, therefore
target_osisnetbsd. However, being a unikernel, rumprun does not support process management, signals or virtual memory, so related functions might fail at runtime. For this reason, stack guards are disabled instd.To support conditional compilation,
target_envis set torumprun. Maybetarget_vendorwould be technically more fitting, but it doesn't seem to be worth the hassle.Code for rumprun is always cross-compiled, it uses always static linking and needs a custom linker. The target makes use of the newly introduced
no_default_libsflag, as the rumprun linker will otherwise not use the correct search path.