Compare commits
No commits in common. "ccf474922efbabfb630071b596fc1083a10197fb" and "3ca717df262ae097981f18290f6a41bf5f5d8f71" have entirely different histories.
ccf474922e
...
3ca717df26
|
|
@ -2,9 +2,5 @@
|
||||||
runner = "riscv64-unknown-elf-gdb -q -x gdb_init"
|
runner = "riscv64-unknown-elf-gdb -q -x gdb_init"
|
||||||
linker = "riscv64-linux-gnu-gcc"
|
linker = "riscv64-linux-gnu-gcc"
|
||||||
|
|
||||||
[alias]
|
|
||||||
x86_64 = "build --release"
|
|
||||||
riscv64 = "build --release --target riscv64gc-unknown-linux-gnu"
|
|
||||||
|
|
||||||
[build]
|
[build]
|
||||||
target = "x86_64-unknown-linux-gnu"
|
target = "x86_64-unknown-linux-gnu"
|
||||||
|
|
@ -10,7 +10,7 @@ RUN touch services/temp-process/dep.txt
|
||||||
RUN touch services/temp-process/run.sh
|
RUN touch services/temp-process/run.sh
|
||||||
RUN echo "./services/temp-process/temp-process" >> 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 settings.json .
|
||||||
COPY temp-process services/temp-process/
|
COPY temp-process services/temp-process/
|
||||||
|
|
||||||
|
|
|
||||||
18
README.md
18
README.md
|
|
@ -6,27 +6,21 @@ in-container integrating util to handle processes runtime
|
||||||
|
|
||||||
## Depends on
|
## Depends on
|
||||||
- `rustup (>=1.27.1)`
|
- `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
|
## Building
|
||||||
|
|
||||||
1. Clone this repo `runner-rs`
|
1. Clone this repo `runner-rs`
|
||||||
|
|
||||||
~~~bash
|
~~~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
|
2. Enter project's dir and set up toolchain list to compile code for RISC-V and AMD64
|
||||||
|
|
||||||
~~~bash
|
~~~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]
|
> [!NOTE]
|
||||||
> Cargo is configured to build an app for amd64/linux defaultly. RISC-based compilation is optional.
|
> 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
|
3.1. Release build of app for amd64/linux
|
||||||
|
|
||||||
~~~bash
|
~~~bash
|
||||||
cargo x86_64
|
cargo build --release
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
3.2. Release build of app for riscv64/linux
|
3.2. Release build of app for riscv64/linux
|
||||||
|
|
||||||
~~~bash
|
~~~bash
|
||||||
cargo riscv64
|
cargo build --release --target riscv64gc-unknown-linux-gnu
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ use structs::*;
|
||||||
use config::*;
|
use config::*;
|
||||||
use utils::*;
|
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")]
|
#[tokio::main(flavor = "multi_thread")]
|
||||||
|
|
@ -89,4 +89,4 @@ fn get_container_id() -> Option<String> {
|
||||||
None
|
None
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue