| Crates.io | pytrace |
| lib.rs | pytrace |
| version | 0.3.3 |
| created_at | 2020-05-31 13:16:34.754663+00 |
| updated_at | 2020-06-18 06:13:28.452941+00 |
| description | A Python library for ray tracing and image generation |
| homepage | |
| repository | https://github.com/Vanille-N/ray_tracer |
| max_upload_size | |
| id | 248157 |
| size | 43,033 |
PyTrace uses PyO3. If you wish to compile this crate, you should use Rust nightly.
cargo build --release
cp target/release/libpytrace.so pytrace.so
That last step will only allow you to import the resulting library from your current directory. You may want to replace it with any of the following :
cp target/release/libpytrace.so usr/bin/pytrace.so
mv target/release/libpytrace.so target/release/pytrace.so; export PATH=$(pwd)/target/release:$PATH
...
You can now import pytrace as tr from any Python script, as long as pytrace.so is in your working directory or in your PATH.
The Github repository provides:
LIB.md containing the autogenerated docs (available from a running Python instance with help(pytrace)).py filesIt is possible to abort the process of creating an image by pressing Ctrl + C, but when doing so, the process will immediately exit. This makes little difference if you run a script, but it does if you run a REPL. Be warned that if you abort the render function, your REPL session will be terminated.