Rs_pbrt v0.4.0 uses the latest pest crate version and moved a lot into the API


Version v0.4.0 of the rs_pbrt library/renderer uses the latest pest crate version. It compiles with all three Rust versions (stable, beta, nightly) now. The parser part got cleaned up a lot and functionality which is independent of the parser, moved into the API. All global variables within the parser are gone and are all collected within ApiState (see link). Therefore only two helper functions are left using unsafe code:

> rg -trust "unsafe"
25:/// Use **unsafe**
35:    unsafe {
42:/// Use **unsafe**
52:    unsafe {

For more details/statistics see the release notes

I also started collecting PBRT scene files on GitLab:

Note: The original C++ code also moved away from a flex/bison-based parser (see details). So it might be worth to follow the C++ code more closely and rewrite the scene file lexer and parser by hand. Now that most of the parser independent code moved into API calls someone could easily experiment with other parser/lexer generators … Let me know in case you are interested. It would also allow a parser to read other scene descriptions (from another renderer) and render those scenes directly (using API calls).

What's everyone working on this week (27/2018)