https://github.com/laysakura/riscv64imac-hello-rs
A "Hellow World!" running on RISC-V (riscv64imac) written in Rust.
https://github.com/laysakura/riscv64imac-hello-rs
dockerfile helloworld risc-v riscv64 rust
Last synced: 10 months ago
JSON representation
A "Hellow World!" running on RISC-V (riscv64imac) written in Rust.
- Host: GitHub
- URL: https://github.com/laysakura/riscv64imac-hello-rs
- Owner: laysakura
- License: cc0-1.0
- Created: 2020-02-02T00:57:27.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-03T05:32:45.000Z (over 6 years ago)
- Last Synced: 2025-04-08T06:34:32.529Z (about 1 year ago)
- Topics: dockerfile, helloworld, risc-v, riscv64, rust
- Language: Dockerfile
- Homepage:
- Size: 15.6 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# riscv64imac-hello-rs
A "Hellow World!" running on RISC-V (riscv64imac) written in Rust.
## Features
- **Works in docker.** No need to insall compilers, linkers, and simulators by yourself.
- Compiled into **64-bit RISC-V (RV64).**
- Uses **stable rustc build.** Not nightly.
- Uses cargo. Not xargo.
- (Optional) Runs with Visual Studio Code Remote Development Container.
## Run in Docker
### In your host machine:
```bash
docker build --rm -t riscv64imac-hello-rs .
docker run -it --rm --volume ${PWD}:/source --workdir /source riscv64imac-hello-rs
```
### In the docker image:
`Ctrl-a x` to quit QEMU monitor.
```bash
root@28fa79ab4d21:/source# cargo run
Compiling riscv64imac-hello-rs v0.1.0 (/source)
Finished dev [unoptimized + debuginfo] target(s) in 0.31s
Running `qemu-system-riscv64 -nographic -bios none -machine virt -kernel target/riscv64imac-unknown-none-elf/debug/riscv64imac-hello-rs`
Hello from Rust!
```
## (Optional) Run with Visual Studio Code Remote Development Container
Open Visual Studio code with:
```bash
code .
```
And select the `Remote-Containers: Add Development Container Configuration Files...` command from the Command Palette (F1) and pick a pre-defined container configuration file.