Compare commits
8 Commits
3ca717df26
...
ccf474922e
| Author | SHA1 | Date |
|---|---|---|
|
|
ccf474922e | |
|
|
aea7db7036 | |
|
|
11cc752d08 | |
|
|
1e515389da | |
|
|
dbc0e73cec | |
|
|
b19b99fcd6 | |
|
|
0282e601ab | |
|
|
63273eb3bc |
|
|
@ -2,5 +2,9 @@
|
||||||
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 runner-rs monitor/
|
COPY target/x86_64-unknown-linux-gnu/release/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,21 +6,27 @@ 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://link-to-project
|
git clone https://github.com/prplV/runner-rs
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
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/
|
cd runner-rs/ && rustup target add riscv64gc-unknown-linux-gnu && rustup target add x86_64-unknown-linux-gnu
|
||||||
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.
|
||||||
|
|
@ -28,13 +34,13 @@ in-container integrating util to handle processes runtime
|
||||||
3.1. Release build of app for amd64/linux
|
3.1. Release build of app for amd64/linux
|
||||||
|
|
||||||
~~~bash
|
~~~bash
|
||||||
cargo build --release
|
cargo x86_64
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
3.2. Release build of app for riscv64/linux
|
3.2. Release build of app for riscv64/linux
|
||||||
|
|
||||||
~~~bash
|
~~~bash
|
||||||
cargo build --release --target riscv64gc-unknown-linux-gnu
|
cargo riscv64
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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 $5}'";
|
static GET_ID_CMD : &'static str = "cat /proc/self/mountinfo | grep '/docker/containers/' | head -1 | awk -F '/' '{print $6}'";
|
||||||
|
|
||||||
|
|
||||||
#[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