Bump spin from 0.5.0 to 0.5.2 in /rust (#24)
Bumps spin from 0.5.0 to 0.5.2.
updated-dependencies:
- dependency-name: spin dependency-type: direct:production …
Signed-off-by: dependabot[bot] support@github.com
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
rCore-user
User programs for rCore OS.
Now it has 6 parts:
ucore
: C-lang, from the original ucore_os_labbiscuit
: C/C++, from Biscuit, based on amusl
instead of originallitc
.rust
: Simple no_std Rust programs.app
: C-lang, custom test programs based onmusl
.nginx
,redis
,busybox
,alpine
,gcc
: Real world applications.vmm
: Simple VMM (Virtual Machine Monitor) runs on top of RVM, can run the unmodified ucore_os_lab as a guest OS.Build
Install prebuilt musl toolchain from musl.cc.
See Travis script ‘install’ section for details.
Then, build userspace programs for rCore:
A rootfs is created at
build/$(arch)
and converted toqcow2
.Support matrix
Note: ❗ means workarounds are used so that they may not work properly. ❌ means failure in compiling or not existed on such platform.
How to run real world programs
How to use Redis
If redis is dynamically linked to musl (default if you use commands above), you might need to copy
ld-musl-$(arch).so.1
to rootfs/lib
by yourself .Alpine rootfs includes one as well.After building redis, you should be able to run redis-server in rCore. Then, start
redis-server
in rCore:Then you should be able to connect to it using
redis-cli
over the network:Note:
redis-cli
in rCore is not working at the time.How to use nginx
Nginx is statically linked to musl instead, so there is no need to copy its dynamic loader. A nginx.conf is provided in this repo and automatically copied to its destination. So, just start
nginx
directly:Then you should be able to visit it via network:
It is generated by
autoindex
.Note:
nginx
might lead to an unresolved file system bug, so you might need to re-create sfs img after killing it.Note: if you want to run nginx in rCore with qemu, you have to set
net = on
when make run. After that, configure the ip of new device tap0.How to use gcc
First, download prebuilt musl toolchain from musl.cc, for example
x86_64-linux-musl-cross.tgz
. Untar it intobuild/x86_64
directory. You are expected have abuild/x86_64/x86_64-linux-musl
directory now.To build a simple C program,
printf.c
for example:You can now run the produced program:
Note: the long linker args can be replaced by invoking gcc instead later when we fix the problem. If you encountered
rcore-fs-fuse
panicking, consider upgrading it to latest version.How to test real alpine apps
simple test for alpine minifs with little apps
test gcc/go/python2/python3/ruby/lua/java/rust
How to run uCore in rCore
Clone this repo recursively with rcore-vmm and ucore_os_lab:
Build with
EN_VMM=y
:Build and run rCore with
HYPERVISOR=on
:Run the
vmm
app in rCore shell:Now uCore is booting and your can get uCore’s shell soon.