Crates.io | type-crawler |
lib.rs | type-crawler |
version | 0.1.0 |
created_at | 2025-08-09 21:15:24.732686+00 |
updated_at | 2025-08-23 13:54:38.135036+00 |
description | A tool to scan C/C++ types using libclang |
homepage | |
repository | https://github.com/AetiasHax/type-crawler |
max_upload_size | |
id | 1788245 |
size | 77,856 |
A library which scans for type definitions in a C/C++ codebase.
use type_crawler::{Env, EnvOptions, TypeCrawler};
let env = Env::new(EnvOptions::default());
let crawler = TypeCrawler::new(env).unwrap();
let types = crawler.parse_file("path/to/file.hpp").unwrap();
for ty in types.types() {
println!("{ty}");
}
See the lib/tests/
directory for more examples.
The clang
crate only allows one Clang
instance at a time, so tests must be run on one thread:
cargo test -- --test-threads=1