Skip to content
/ autocxx Public
forked from google/autocxx

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

License

Notifications You must be signed in to change notification settings

b0o/autocxx

This branch is 107 commits behind google/autocxx:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

baa5d61 · Jan 27, 2025
Dec 28, 2024
Jan 8, 2025
Jan 8, 2025
Jan 21, 2025
Jan 8, 2025
Jan 8, 2025
Jan 27, 2025
Jan 8, 2025
Jan 8, 2025
Dec 2, 2024
Jan 8, 2025
Feb 27, 2022
Jan 18, 2022
Jan 8, 2025
Jan 8, 2025
Aug 14, 2020
Aug 14, 2020
Feb 28, 2022
May 7, 2024

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 99.7%
  • Other 0.3%