Add a comment explaing rust_lib
This commit is contained in:
@@ -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<F>(crate_dir: String,
|
||||
items_callback: &F)
|
||||
where F: Fn(String, &Vec<syn::Item>)
|
||||
|
||||
Reference in New Issue
Block a user