Skip to content

Commit 9edffaa

Browse files
committed
Update README.md and add the loader_app template
1 parent 8ab91e2 commit 9edffaa

File tree

9 files changed

+61
-42
lines changed

9 files changed

+61
-42
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ruxgo"
3-
version = "0.9.4"
3+
version = "0.9.5"
44
edition = "2021"
55
authors = ["Zewei Yang <[email protected]>"]
66
description = "A Cargo-like build tool for building C and C++ applications"

README.md

Lines changed: 10 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,37 @@
11
# Ruxgo
22

3-
Ruxgo is a Cargo-like build tool for building C and C++ applications that relies solely on a Toml file.
3+
Ruxgo is a Cargo-like build tool for building C/C++ applications that relies solely on a Toml file.
44

5-
**To start using Ruxgo**, learn more at [The Ruxgo Book](https://ruxgo.syswonder.org/).
5+
It is also a companion command-line tool for RuxOS and has the explicit aim of making it easy to build and manage your C/C++ applications.
66

7-
🚧 Working In Progress.
7+
**To start using Ruxgo**, learn more at [The Ruxgo Book](https://ruxgo.syswonder.org/).
88

99
## Installation
1010

11-
To build the `ruxgo` executable from source, you will first need to install Rust and Cargo. Follow the instructions on the [Rust installation page](https://www.rust-lang.org/tools/install). Ruxgo currently requires at least Rust version 1.74.
12-
13-
Once you have installed Rust, the following command can be used to build and install Ruxgo:
11+
Ruxgo currently requires at least Rust version 1.75. You can install it with Cargo:
1412

1513
```sh
1614
cargo install ruxgo
1715
```
1816

19-
The version published to [crates.io](https://crates.io/) will ever so slightly be behind the version hosted on GitHub. If you need the latest version you can build the git version of ruxgo yourself.
20-
21-
```sh
22-
cargo install --git https://github.com/syswonder/ruxgo.git ruxgo
23-
```
24-
2517
## Usage
2618

27-
Write a `config_linux.toml` for linux and `config_win32.toml` for windows in the project directory.
28-
29-
You can then build the project with:
30-
```console
31-
ruxgo -b
32-
```
33-
34-
Once built, you can execute the project via:
35-
```console
36-
ruxgo -r
37-
```
38-
39-
For help:
40-
```console
41-
ruxgo --help
42-
```
43-
44-
You can also configure the log level with the environment variable `"RUXGO_LOG_LEVEL"`, the default log level is "Info".
19+
Ruxgo supports building self-developed applications to run on linux or windows platforms, and also supports assembling and building Unikernel-based RuxOS and running applications on it. You just need to Write a `config_linux.toml` for linux or `config_win32.toml` for windows in the project directory.
4520

46-
## Ruxgo-apps
21+
The `ruxgo/apps/` directory places all the Toml files that have been tested, you can switch to either directory and follow the instructions to build the application.
4722

48-
The `ruxgo/apps/` directory places all the Toml files that have been tested, you can switch to either directory and follow the instructions to build the application. Currently, there are two ways to build an app:
23+
- If you are developing your own application and want to build and run it, you can refer to the template to write a Toml file, then put it in your project directory, and use ruxgo to build and run it.
4924

50-
- If building locally, you'll need to download the apps source code and then use ruxgo to build and run it.
25+
- If you want to build an already supported app on ruxos, you need to copy `config_<platform>.toml` from `ruxgo/apps/<name>/ruxos` into `ruxos/apps/c/<name>`, then refer to the instructions and use ruxgo to build and run it.
5126

52-
- If you want to build on ruxos, you need to copy `config_<platform>.toml` from `ruxgo/apps/<name>/ruxos` into `ruxos/apps/c/<name>`, then download the apps source code and use ruxgo to build and run it.
27+
- If you have your own app executable and want to run it on RuxOS, you can refer to the template under `ruxgo/apps/loader_app` and configure your own, then use ruxgo to build and run it.
5328

5429
**Note:** Refer to the README.md in each app directory for details. The following applications are already supported:
5530

5631
* [x] [redis](apps/redis)
5732
* [x] [sqlite3](apps/sqlite3)
5833
* [x] [iperf](apps/iperf)
34+
* [x] [loader_app](apps/loader_app)
5935
* [x] helloworld
6036
* [x] memtest
6137
* [x] httpclient

apps/loader_app/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Load your app executable to run on RuxOS
2+
3+
Inside this is a configuration template for loading your app executable, you just need to fill in your app path in the app field in [build].
4+
5+
To load and run your app executable, you first need to create your app directory under **`ruxos/apps/c/`**, then put your custom toml files into it, and then build and run with the following commands:
6+
7+
```bash
8+
# Build and Run
9+
ruxgo -b
10+
ruxgo -r
11+
```
12+
13+
**Note**:
14+
15+
The app executable needs to be compiled by musl.

apps/loader_app/config_linux.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[build]
2+
compiler = "gcc"
3+
# fill in your app path
4+
app = "/your_app_path"
5+
6+
[os]
7+
name = "ruxos"
8+
services = ["alloc","fp_simd","irq","multitask","fs","net","pipe","epoll","poll","rtc","virtio-9p"]
9+
ulib = "ruxmusl"
10+
11+
[os.platform]
12+
name = "aarch64-qemu-virt"
13+
smp = "1"
14+
log = "info"
15+
16+
[os.platform.qemu]
17+
memory = "256M"
18+
net = "y"
19+
v9p = "y"
20+
v9p_path = "./rootfs"
21+
# your app parameter config
22+
args = ""

doc/ruxgo_book/src/guide/builder_module.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
**[build]** 模块描述了编译器的类型。它包含 `compiler`
44

5-
- `compiler`: 指定编译器类型,例如: "gcc"。
5+
- `compiler`: 指定编译器类型,例如: "gcc"。
6+
- `app`: 指定 app 可执行文件的路径。

doc/ruxgo_book/src/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ruxgo 安装
22

3-
要安装`ruxgo`可执行文件,您首先需要安装 Rust 和 Cargo。按照[Rust安装页面](https://www.rust-lang.org/tools/install)上的说明操作。Ruxgo 目前至少需要 Rust 1.74 版本。
3+
要安装`ruxgo`可执行文件,您首先需要安装 Rust 和 Cargo。按照[Rust安装页面](https://www.rust-lang.org/tools/install)上的说明操作。Ruxgo 目前至少需要 Rust 1.75 版本。
44

55
一旦您安装了 Rust,就可以使用以下命令来构建和安装 Ruxgo:
66

doc/ruxgo_book/src/introduction.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
# 简介
22

3-
[Ruxgo](https://github.com/syswonder/ruxgo) 是一个类似 Cargo 的构建工具,用于构建 C 和 C++ 应用程序。与传统的 Make 构建工具不同,Ruxgo 的构建过程仅依赖一个 Toml 文件,其摒弃了繁杂的语法和规则限制,使得编译过程回归到更为简洁的状态。如果你对 Makefile 感到疲倦,Ruxgo 绝对值得你尝试,它能让你的构建过程变得更加轻松和高效。
3+
[Ruxgo](https://github.com/syswonder/ruxgo) 是一个类似 Cargo 的构建工具, 专用于构建 C/C++ 应用程序, 它只依赖于一个 Toml 文件。
4+
5+
它也是 [RuxOS](https://github.com/syswonder/ruxos) 的一个配套命令行工具, 其目标是简化 RuxOS 及其上 C/C++ 应用程序的组装构建和管理。

doc/ruxgo_book/src/run_apps.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
# 运行不同的app
22

3-
`ruxgo/apps/`目录下放置了所有经过测试的 Toml 文件。目前,有两种方法构建应用程序:
3+
`ruxgo/apps/`目录下放置了所有经过测试的 Toml 文件。
44

5-
- 如果在本地构建,你只需要在`ruxgo/apps/<name>/local`目录下下载 app 的源代码,然后使用 ruxgo 构建并运行它
5+
- 如果你正在开发自己的应用程序并希望构建和运行它,你可以参考模板写一个 Toml 文件,然后把它放在你的项目目录下,即可使用 ruxgo 来构建和运行它
66

7-
- 如果在 RuxOS 上构建,你需要将`config_linux.toml``ruxgo/apps/<name>/ruxos`复制到`ruxos/apps/c/<name>`,然后下载 app 的源代码并使用 ruxgo 来构建并运行它。
7+
- 如果你想在 RuxOS 上构建一个已经支持的应用程序,你需要将`config_linux.toml``ruxgo/apps/<name>/ruxos`复制到`ruxos/apps/c/<name>`,然后参考说明使用 ruxgo 构建并运行它。
8+
9+
- 如果你有自己的应用程序可执行文件,并希望在 RuxOS 上运行它,你可以参考`ruxgo/apps/loader_app`下的模板并配置你自己的 Toml 文件,然后使用 ruxgo 来构建和运行它。
810

911
**注:** 有关详细信息,请参阅每个 app 目录下的 README.md。以下应用程序已获支持:
1012

1113
* [x] [redis](https://github.com/syswonder/ruxgo/tree/master/apps/redis)
1214
* [x] [sqlite3](https://github.com/syswonder/ruxgo/tree/master/apps/sqlite3)
1315
* [x] [iperf](https://github.com/syswonder/ruxgo/tree/master/apps/iperf)
16+
* [x] [loader_app](https://github.com/syswonder/ruxgo/tree/master/apps/loader_app)
1417
* [x] helloworld
1518
* [x] memtest
1619
* [x] httpclient

0 commit comments

Comments
 (0)