blob: 190ca9b2b29af0631db19e751d9d97b0e4986a3e [file] [log] [blame] [view] [edit]
# Rust bindings for the C++ standard library
This directory contains the `cc_std` Rust crate - the crate generated by
`rs_bindings_from_cc` and providing bindings for the C++ standard library. To
depend on it, add the following to your `rust_library` rule:
```
cc_deps = ["//support/cc_std"]
```
This crate provides, for example:
- The `cc_std::std::raw_string_view` type alias (corresponding to
[`std::string_view`](https://en.cppreference.com/w/cpp/header/string_view)
in C++)
- The `cc_std::tm` struct (corresponding to
[`tm`](https://en.cppreference.com/w/c/chrono/tm) in C++)
In addition to automatically generated bindings, the crate also provides
manually authored trait implementations that supplement the automated bindings.
For example:
- `impl From<&'static str> for raw_string_view`