cxx_dlang/lib.rs
1#![allow(unexpected_cfgs)]
2//! Build-time helper crate that ships reusable D-side bindings for the cxx.rs
3//! `rust::*` types (`Str`, `String`, `Slice<T>`, `Vec<T>`, `Fn<R(A)>`) plus a
4//! minimal `std::unique_ptr<T>` value-type binding.
5//!
6//! Downstream crates declare their own `#[cxx::bridge]` and import the D
7//! module `cxx_d` from this crate's `d/cxx_d.d` to wire the C++ ABI both ways
8//! without re-writing the LDC2 toolchain glue.
9//!
10//! The companion `build.rs` discovers `ldc2`, compiles `d/cxx_d.d` with the
11//! curated `--preview=` safety flag set, and links druntime + phobos2
12//! statically into the host crate.
13
14pub use cxx;