x86_64-unknown-linux-gnu
(1)x86_64-unknown-linux-musl
(1) note: glibc version >= 2.35
for users install cargo
stable latest build system
for devels it's advisable to install the entire (stable latest) toolchain using rustup
For unit tests coverage llvm-tools-preview
is required as additional component coupled with\
cargo-llvm-cov
for easily use LLVM source-based code coverage
There is an handy makefile
useful to:
rustdoc
cargo-llvm-cov
Install from binary:
curl -sSf https://andros21.github.io/rustracer/install.sh | bash
(2)
click to show other installation options
```bash
gnu
variant in ~/.rustracer/bin
export PREFIX='~/.rustracer/' curl -sSf https://andros21.github.io/rustracer/install.sh | bash -s -- gnu
0.4.0
version musl
variant in ~/.rustracer/bin
export PREFIX='~/.rustracer/' curl -sSf https://andros21.github.io/rustracer/install.sh | bash -s -- musl 0.4.0 ```
(2) note: will install latest musl release in ~/.local/bin
Install from source code, a template could be:
cargo install rustracer
(3)
click to show other installation options
```bash
Cargo.lock
in ~/.rustracer/bin
export PREFIX='~/.rustracer/' cargo install --locked --root $PREFIX rustracer
0.4.0
version in ~/.rustracer/bin
export VER='0.4.0' export PREFIX='~/.rustracer/' cargo install --root $PREFIX --version $VER rustracer ```
(3) note: will install latest release in ~/.cargo/bin
| subcommands | description | | :------------------------------------------------ | :-------------------------------------------- | | rustracer-convert | convert an hdr image into ldr image | | rustracer-demo | render a simple demo scene (example purpose) | | rustracer-render | render a scene from file (yaml formatted) | | rustracer-completion | generate shell completion script (hidden) |
click to show rustracer -h
```console a multi-threaded raytracer in pure rust
Usage: rustracer
Commands: convert Convert HDR (pfm) image to LDR (ff|png) image demo Render a demo scene (hard-coded in main) render Render a scene from file (yaml formatted)
Options: -h, --help Print help information -V, --version Print version information
```
rustracer convert image.pfm image.png
rustracer demo --width 1920 --height 1080 --anti-aliasing 3 demo.png
(4)
demo.png: cpu Intel(R) Xeon(R) CPU E5520 @ 2.27GHz | threads 8 | time ~35s
\
demo scene 360 degree (see makefile
):
click to show rustracer-demo -h
```console Render a demo scene (hard-coded in main)
Usage: rustracer demo [OPTIONS]
Arguments:
Options:
-v, --verbose Print stdout information
--output-pfm Output also hdr image
--orthogonal Use orthogonal camera instead of perspective camera
--width --help
for more detail)
-V, --version Print version information
```
(4) note: all available threads are used, set RAYON_NUM_THREADS
to override
rustracer render --anti-aliasing 3 examples/demo.yml demo.png
(5)
rustracer render --width 1280 --height 720 --anti-aliasing 3 flake.yml flake.png
(5)
flake.png: cpu Intel(R) Xeon(R) CPU E5520 @ 2.27GHz | threads 8 | time ~7h
click to show rustracer-render -h
```console Render a scene from file (yaml formatted)
Usage: rustracer render [OPTIONS]
Arguments: Input scene file
Options:
-v, --verbose Print stdout information
--output-pfm Output also hdr image
--width --help
for more detail)
-V, --version Print version information
```
(5) note: all available threads are used, set RAYON_NUM_THREADS
to override
rustracer completion bash
(6)
note: close-open your shell, and here we go, tab completions now available!
click to show rustracer-completion -h
```console Generate shell completion script
Usage: rustracer completion [OPTIONS]
Arguments:
Options: -o, --output
```
(6) note: bash>4.1
and bash-complete>2.9