Compare commits

..

No commits in common. "ccf474922efbabfb630071b596fc1083a10197fb" and "3ca717df262ae097981f18290f6a41bf5f5d8f71" have entirely different histories.

4 changed files with 9 additions and 19 deletions

View File

@ -2,9 +2,5 @@
runner = "riscv64-unknown-elf-gdb -q -x gdb_init"
linker = "riscv64-linux-gnu-gcc"
[alias]
x86_64 = "build --release"
riscv64 = "build --release --target riscv64gc-unknown-linux-gnu"
[build]
target = "x86_64-unknown-linux-gnu"

View File

@ -10,7 +10,7 @@ RUN touch services/temp-process/dep.txt
RUN touch services/temp-process/run.sh
RUN echo "./services/temp-process/temp-process" >> services/temp-process/run.sh
COPY target/x86_64-unknown-linux-gnu/release/runner-rs monitor/
COPY runner-rs monitor/
COPY settings.json .
COPY temp-process services/temp-process/

View File

@ -6,27 +6,21 @@ in-container integrating util to handle processes runtime
## Depends on
- `rustup (>=1.27.1)`
- `gcc-riscv64-unknown-elf`
- `build-essential`
## Setting up
Download and execute rustup.sh
~~~bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
~~~
## Building
1. Clone this repo `runner-rs`
~~~bash
git clone https://github.com/prplV/runner-rs
git clone https://link-to-project
~~~
2. Enter project's dir and set up toolchain list to compile code for RISC-V and AMD64
~~~bash
cd runner-rs/ && rustup target add riscv64gc-unknown-linux-gnu && rustup target add x86_64-unknown-linux-gnu
cd runner-rs/
rustup target add riscv64gc-unknown-linux-gnu
rustup target add x86_64-unknown-linux-gnu
~~~
> [!NOTE]
> Cargo is configured to build an app for amd64/linux defaultly. RISC-based compilation is optional.
@ -34,13 +28,13 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
3.1. Release build of app for amd64/linux
~~~bash
cargo x86_64
cargo build --release
~~~
3.2. Release build of app for riscv64/linux
~~~bash
cargo riscv64
cargo build --release --target riscv64gc-unknown-linux-gnu
~~~

View File

@ -16,7 +16,7 @@ use structs::*;
use config::*;
use utils::*;
static GET_ID_CMD : &'static str = "cat /proc/self/mountinfo | grep '/docker/containers/' | head -1 | awk -F '/' '{print $6}'";
static GET_ID_CMD : &'static str = "cat /proc/self/mountinfo | grep '/docker/containers/' | head -1 | awk -F '/' '{print $5}'";
#[tokio::main(flavor = "multi_thread")]