README.md 1.32 KB
Newer Older
Stefan Lankes's avatar
Stefan Lankes committed
1
2
3
# rusty-loader

**rusty-loader** is a loader to run [RustyHermit](https://github.com/hermitcore/libhermit-rs) within [Qemu](https://www.qemu.org).
Stefan Lankes's avatar
Stefan Lankes committed
4
To build the loader the llvm-tools and the source code of Rust's runtime are required and can be installed with following command:
Stefan Lankes's avatar
Stefan Lankes committed
5
6

```bash
Stefan Lankes's avatar
Stefan Lankes committed
7
8
$ rustup component add rust-src
$ rustup component add llvm-tools-preview
Stefan Lankes's avatar
Stefan Lankes committed
9
10
```

11
12
You also need `nasm` and `ar` installed on your machine.

Stefan Lankes's avatar
Stefan Lankes committed
13
14
Afterwards, the loader can be build as follows:

Stefan Lankes's avatar
Stefan Lankes committed
15
```bash
jschwe's avatar
jschwe committed
16
$ make
Stefan Lankes's avatar
Stefan Lankes committed
17
18
19
20
21
22
```

Afterwards, the loader is stored in `target/x86_64-unknown-hermit-loader/debug/` as `rusty-loader`.
As final step the unikernel application `app` can be booted with following command:

```bash
23
$ qemu-system-x86_64 -display none -smp 1 -m 64M -serial stdio  -kernel path_to_loader/rusty-loader -initrd path_to_app/app -cpu qemu64,apic,fsgsbase,rdtscp,xsave,xsaveopt,fxsr
Stefan Lankes's avatar
Stefan Lankes committed
24
25
26
27
28
29
30
31
32
33
34
35
36
37
```

It is important to enable the processor features _fsgsbase_ and _rdtscp_ because it is a prerequisite to boot RustyHermit.

Please read the README of [RustyHermit](https://github.com/hermitcore/libhermit-rs) for more information.

## License

Licensed under either of

* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)

at your option.