Crates.io | cpp_new |
lib.rs | cpp_new |
version | 0.1.0 |
source | src |
created_at | 2018-12-04 21:17:42.261519 |
updated_at | 2018-12-04 21:17:42.261519 |
description | Overload C++ new/delete to map them back to Rust's global allocator |
homepage | |
repository | https://github.com/sheredom/rust_cpp_new |
max_upload_size | |
id | 100114 |
size | 15,711 |
This Rust crate maps the C++ new/delete/new[]/delete[] operators via extern "C" functions into Rust's allocators.
Just include the crate like:
extern crate cpp_new;
And it'll remap the C++ new/delete to Rust's global allcators.
Where you want to use this is if you have some pre-existing C++ library that you do not control, and you want to ensure the allocations being done in the library are being tracked by Rust's global allocator.
This code is licensed under the CC0 1.0 Universal license, which is a permissible public domain license.