setting up for cross-platform building
parent
2b44b79bca
commit
28cbb3d733
|
|
@ -0,0 +1,6 @@
|
||||||
|
[target.riscv64gc-unknown-linux-gnu]
|
||||||
|
runner = "riscv64-unknown-elf-gdb -q -x gdb_init"
|
||||||
|
linker = "riscv64-linux-gnu-gcc"
|
||||||
|
|
||||||
|
[build]
|
||||||
|
target = "x86_64-unknown-linux-gnu"
|
||||||
31
README.md
31
README.md
|
|
@ -7,7 +7,7 @@ in-container integrating util to handle processes runtime
|
||||||
## Depends on
|
## Depends on
|
||||||
- `rustup (>=1.27.1)`
|
- `rustup (>=1.27.1)`
|
||||||
|
|
||||||
## Local init
|
## Building
|
||||||
|
|
||||||
1. Clone this repo `runner-rs`
|
1. Clone this repo `runner-rs`
|
||||||
|
|
||||||
|
|
@ -15,22 +15,43 @@ in-container integrating util to handle processes runtime
|
||||||
git clone https://link-to-project
|
git clone https://link-to-project
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
2. Enter project's dir
|
2. Enter project's dir and set up toolchain list to compile code for RISC-V and AMD64
|
||||||
|
> [!NOTE]
|
||||||
|
> Cargo is configured to build an app for amd64/linux defaultly. RISC-based compilation is optional.
|
||||||
|
|
||||||
~~~bash
|
~~~bash
|
||||||
cd runner-rs/
|
cd runner-rs/
|
||||||
|
rustup target add riscv64gc-unknown-linux-gnu
|
||||||
|
rustup target add x86_64-unknown-linux-gnu
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
|
||||||
3. Release build of app
|
3.1. Release build of app for amd64/linux
|
||||||
|
|
||||||
~~~bash
|
~~~bash
|
||||||
cargo build --release
|
cargo build --release
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
4. Execution
|
3.2. Release build of app for riscv64/linux
|
||||||
|
|
||||||
~~~bash
|
~~~bash
|
||||||
./target/release/runner-rs
|
cargo build --release --target riscv64gc-unknown-linux-gnu
|
||||||
|
~~~
|
||||||
|
|
||||||
|
|
||||||
|
## Execution for amd64/linux
|
||||||
|
~~~bash
|
||||||
|
./target/x86_64-unknown-linux-gnu/release/runner-rs
|
||||||
|
~~~
|
||||||
|
or
|
||||||
|
~~~bash
|
||||||
|
cargo run --release
|
||||||
|
~~~
|
||||||
|
|
||||||
|
|
||||||
|
## Execution for riscv64/linux
|
||||||
|
~~~bash
|
||||||
|
./target/riscv64gc-unknown-linux-gnu/release/runner-rs
|
||||||
~~~
|
~~~
|
||||||
or
|
or
|
||||||
~~~bash
|
~~~bash
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue