Support bindings for integer types - e.g. `i32` or `usize`.
PiperOrigin-RevId: 485659332
diff --git a/common/code_gen_utils.rs b/common/code_gen_utils.rs
index 84f1e9c..53d618a 100644
--- a/common/code_gen_utils.rs
+++ b/common/code_gen_utils.rs
@@ -49,6 +49,13 @@
Self::SystemHeader("cstddef")
}
+ /// Creates a `CcInclude` that represents `#include <cstdint>` and provides
+ /// C++ types like `std::int16_t` or `std::uint32_t`. See also
+ /// https://en.cppreference.com/w/cpp/header/cstdint
+ pub fn cstdint() -> Self {
+ Self::SystemHeader("cstdint")
+ }
+
/// Creates a `CcInclude` that represents `#include <memory>`.
/// See also https://en.cppreference.com/w/cpp/header/memory
pub fn memory() -> Self {