README.md 1.13 KB
Newer Older
Eric Kidd's avatar
Eric Kidd committed
1
2
3
4
5
6
7
# A toy OS in Rust

This is based on Philipp Oppermann's
[excellent series of blog posts][blog].  It's purely a learning exercise,
to see what Rust feels like on bare metal.

[blog]: http://blog.phil-opp.com/
8
9
[rust-barebones-kernel]: https://github.com/thepowersgang/rust-barebones-kernel

10
## Building
11

Eric Kidd's avatar
Eric Kidd committed
12
First, we need to check out the source and rebuild the Rust runtime using a
Eric Kidd's avatar
Eric Kidd committed
13
bare-metal target and no hardware floating point support:
14

Eric Kidd's avatar
Eric Kidd committed
15
16
```sh
# Get our source code.
17
18
git clone https://github.com/emk/toyos-rs.git
cd toyos-rs
Eric Kidd's avatar
Eric Kidd committed
19
20
21
22
23
24
25
26

# Set up a Rust compiler.
curl https://sh.rustup.rs -sSf | sh
rustup update nightly-2016-09-16
rustup override set nightly-2016-09-16

# Get a copy of the Rust source code so we can rebuild core
# for a bare-metal target.
27
28
git submodule update --init
make runtime
29
30
```

31
From here, we should be able to build a kernel and run it using QEMU:
32

Eric Kidd's avatar
Eric Kidd committed
33
```sh
34
make run
35
36
```

Eric Kidd's avatar
Eric Kidd committed
37
38
You should be able to type.

39
## Licensing
40

41
42
Licensed under the [Apache License, Version 2.0][LICENSE-APACHE] or the
[MIT license][LICENSE-MIT], at your option.
43

44
45
[LICENSE-APACHE]: http://www.apache.org/licenses/LICENSE-2.0
[LICENSE-MIT]: http://opensource.org/licenses/MIT