Merge pull request 364 from adetaylor/make-cxx-h-available

This commit is contained in:
David Tolnay 2020-10-16 13:11:17 -07:00
commit 33b1ae9564
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
3 changed files with 5 additions and 0 deletions

View File

@ -2,3 +2,6 @@ This directory contains CXX's C++ code generator. This code generator has two
public frontends, one a command-line application (binary) in the *cmd* directory
and the other a library intended to be used from a build.rs in the *build*
directory.
There's also a 'lib' frontend which is intended to allow higher level code
generators to embed cxx. This is not yet recommended for general use.

View File

@ -20,6 +20,7 @@ mod gen;
mod syntax;
pub use crate::error::Error;
pub use crate::gen::include::HEADER;
pub use crate::gen::{GeneratedCode, Opt};
use proc_macro2::TokenStream;

View File

@ -1,6 +1,7 @@
use crate::gen::out::OutFile;
use std::fmt::{self, Display};
/// The complete contents of the "rust/cxx.h" header.
pub static HEADER: &str = include_str!("include/cxx.h");
pub(super) fn write(out: &mut OutFile, needed: bool, guard: &str) {