Skip to content

Commit

Permalink
Merge pull request 364 from adetaylor/make-cxx-h-available
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Oct 16, 2020
2 parents 1137642 + 0e01d64 commit 33b1ae9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
1 change: 1 addition & 0 deletions gen/lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions gen/src/include.rs
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down

0 comments on commit 33b1ae9

Please sign in to comment.