Skip to content

Commit 9a17968

Browse files
committed
improve docs
1 parent d3e85a4 commit 9a17968

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/doc/rustc/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
- [solaris](platform-support/solaris.md)
107107
- [\*-nto-qnx-\*](platform-support/nto-qnx.md)
108108
- [\*-unikraft-linux-musl](platform-support/unikraft-linux-musl.md)
109+
- [\*-unknown-helenos](platform-support/helenos.md)
109110
- [\*-unknown-hermit](platform-support/hermit.md)
110111
- [\*-unknown-freebsd](platform-support/freebsd.md)
111112
- [\*-unknown-netbsd\*](platform-support/netbsd.md)

src/doc/rustc/src/platform-support/helenos.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ These targets only support cross-compilation. The targets will[^1] support libst
2020

2121
You need to have a local clone of the HelenOS repository and the HelenOS toolchain set up, no HelenOS-Rust development artifacts are available.
2222

23-
[^1]: The support is not yet available, because it needs to be done in a separate PR, because compiler support needs to be merged first to allow creating libc bindings
23+
[^1]: libstd is not yet available, because it needs to be done in a separate PR, because compiler support needs to be merged first to allow creating libc bindings
2424

2525
## Building
2626

@@ -35,18 +35,20 @@ touch /tmp/test.c
3535
i686-helenos-gcc -v -c /tmp/test.c 2>&1 | grep LIBRARY_PATH
3636
```
3737

38-
## Building the target
38+
### Building the target
3939

4040
When you have the HelenOS toolchain set up and installed in your path, you can build the Rust toolchain using the standard procedure. See [rustc dev guide](https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html).
4141

42-
## Building Rust programs
42+
### Building Rust programs
4343

44-
No special setup is needed. Simply use the toolchain you built above and run `cargo build --target <arch>-unknown-helenos`.
44+
Use the toolchain that you have built above and run `cargo build --target <arch>-unknown-helenos`.
4545

4646
## Testing
4747

48-
Running the Rust test suite has not been attempted yet.
48+
After you build a Rust program for HelenOS, you can put it into the `dist` directory of the HelenOS build, build the ISO image, and then run it either in an emulator, or on real hardware. See HelenOS wiki for further instructions on running the OS.
49+
50+
Running the Rust testsuite has not been attempted yet due to missing host tools and networking code.
4951

5052
## Cross-compilation toolchains and C code
5153

52-
You should be able to cross-compile and link any needed C code using `<arch>-helenos-gcc` that you built above. However, note that clang support is highly lacking. Therefore, to run tools such as `bindgen`, you will need to provide flag `-nostdinc` and manually specify the include paths to HelenOS headers, which you will find in the `export-dev` + in the cross-compilation toolchain (e.g. `~/.local/share/HelenOS/cross/lib/gcc/i686-helenos/14.2.0/include`).
54+
You should be able to cross-compile and link any needed C code using `<arch>-helenos-gcc` that you built above. However, note that clang support is highly lacking. Therefore, to run tools such as `bindgen`, you will need to provide flag `-nostdinc` and manually specify the include paths to HelenOS headers, which you will find in the `export-dev` folder + in the cross-compilation toolchain (e.g. `~/.local/share/HelenOS/cross/lib/gcc/i686-helenos/14.2.0/include`).

0 commit comments

Comments
 (0)