| Crates.io | autocxx |
| lib.rs | autocxx |
| version | 0.30.0 |
| created_at | 2020-09-06 04:25:00.057861+00 |
| updated_at | 2025-03-03 10:18:48.148259+00 |
| description | Safe autogenerated interop between Rust and C++ |
| homepage | https://google.github.io/autocxx/ |
| repository | https://github.com/google/autocxx |
| max_upload_size | |
| id | 285293 |
| size | 113,852 |
This project is a tool for calling C++ from Rust in a heavily automated, but safe, fashion.
The intention is that it has all the fluent safety from cxx whilst generating interfaces automatically from existing C++ headers using a variant of bindgen. Think of autocxx as glue which plugs bindgen into cxx.
For full documentation, see the manual.
autocxx::include_cpp! {
#include "url/origin.h"
generate!("url::Origin")
safety!(unsafe_ffi)
}
fn main() {
let o = ffi::url::Origin::CreateFromNormalizedTuple("https",
"google.com", 443);
let uri = o.Serialize();
println!("URI is {}", uri.to_str().unwrap());
}
This is not an officially supported Google product.
Licensed under either of Apache License, Version 2.0 or MIT license at your option.