autocxx-integration-tests
cargo install autocxx-integration-tests

autocxx-integration-tests

Tool for safe ergonomic Rust/C++ interop driven from existing C++ headers

by google

0.22.3 (see all)License:MIT OR Apache-2.0
cargo install autocxx-integration-tests
Readme

Autocxx

GitHub crates.io docs.rs

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.

Overview

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());
}

License and usage notes

This is not an officially supported Google product.

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

GitHub Stars

1.5K

LAST COMMIT

2mos ago

MAINTAINERS

1

CONTRIBUTORS

27

OPEN ISSUES

73

OPEN PRs

11
VersionTagPublished
0.22.3
3d ago
0.22.2
22d ago
0.22.1
1mo ago
0.22.0
2mos ago
No alternatives found
No tutorials found
Add a tutorial