rust-cpp
rust-cpp copied to clipboard
cpp_synmap support for parsing source files from include! macro calls
trafficstars
In theory this would just be a case of Walker detecting include macro calls in its Folder implementation. Initially it could be limited to handling includes of the form
include!(concat!(env!("OUT_DIR"), "/path/to/source/file.rs"));
The main benefit of this is so that files generated from build scripts can contain macros like cpp!. I'm also relying on cpp_synmap for embed_js, so this would be of use for the js! and include_js! macros as well.
That looks complicated to do as we need to parse so many environment variable.
I wonder if it would not be better to add api to cpp_build which would allow to add more files.
Note that cpp_synmap no longer exist in this repository.