An open API service indexing awesome lists of open source software.

https://github.com/vmchale/cpp-build

Use the C pre-processor on Rust projects
https://github.com/vmchale/cpp-build

c c-preprocessor rust

Last synced: 6 months ago
JSON representation

Use the C pre-processor on Rust projects

Awesome Lists containing this project

README

          

# cpp-rs

Put this in your `build.rs` to use the C pre-processor with Rust.

## Example Use

```rust
fn main() {
walk_dir("src")
}
```

This will pre-process any `.cpprs` source files in `src/` using
the system C compiler.

See the [lzo-macros](https://github.com/vmchale/cpp-build/tree/main/lzo-macros)
example.

## Known Defects

The C pre-processor will discard any lines beginning with `#`, so that e.g.

```
#[macro_use]
```

would be thrown away.