diff --git a/src/rust_lib.rs b/src/rust_lib.rs index 2588d3e..5860c29 100644 --- a/src/rust_lib.rs +++ b/src/rust_lib.rs @@ -4,6 +4,15 @@ use std::path::PathBuf; use syn; +/* + * Recursively parses a rust library starting at the root crate's directory. + * + * Inside a crate, `mod` and `extern crate` declarations are followed + * and parsed. To find an external crate, the parser looks in the + * parent directory of the root crate. This could be improved + * to read the crate's Cargo.toml to find the crate, but it works well + * enough to find the crates that matter for creating bindings. + */ pub fn parse(crate_dir: String, items_callback: &F) where F: Fn(String, &Vec)