TTYTEE - A process that exposes 2 copies of the same TTY.
More information is avaiable in the Crate.
For people new to rust we left here an easy copy paste doc to get you running if you want to contribute to this crate.
First you need to install rust stable.
Check first if on your distrib if they provide rustup: For example on Arch Linux it is in the extra repro:
pacman -Ss rustup
[...]
extra/rustup 1.26.0-3 (2.5 MiB 7.0 MiB) (Installed)
The Rust toolchain installer
[...]
Otherwise you can install it through the shell installer:
|
You need then to install toolchains, let's start with the stable and native to your platform that will allow to compile and test locally:
Running
Note: ttytee is executed and the --help
is the passed to it so it prints its help.
)
)
Testing
cargo test
Formatting the entire project
cargo fmt
Cross compiling for ARM targets
For the old 32bit version
First you need to add the crosscompiling and system part of the toolchain: Here we use the musl variation of the libc because the system is so old it is hard to target for. Musl enables us to build a fully static executable.
# somewhere you like you can decompress the tarball (I usually use ~/prefix).
Then in ~/.cargo/config.toml
you can inform Rust which linker you need to use for which target:
[]
= "[where you uncompressed it]/arm-linux-musleabihf-cross/bin/arm-linux-musleabihf-gcc"
Then finally we need to install the rust portion of it.
To compile it for a target, just add it to any of the cargo command like (run, test ...):
- Debug build:
# The file will be produced here ~21MB:
)
- Release build [recommended for prod]:
# The build will be produced here ~5MB:
)
- Super tight prod build added as an example if we target embedded systems:
# The build will be produced here only ~500kB:
For an ARM 64bit version
The standard arm toolchain from arm then works, not that you can probably find it in your distribution too.
Same as the previous steps with
in ~/.cargo/config.toml
[]
= "[path to where you uncompressed it]/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-gcc"