https://github.com/sheredom/rust_cpp_new
A Rust crate that maps C++ new/delete via the Rust allocator mechanism.
https://github.com/sheredom/rust_cpp_new
Last synced: 3 months ago
JSON representation
A Rust crate that maps C++ new/delete via the Rust allocator mechanism.
- Host: GitHub
- URL: https://github.com/sheredom/rust_cpp_new
- Owner: sheredom
- License: cc0-1.0
- Created: 2018-12-02T09:32:56.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-04-28T21:43:05.000Z (over 4 years ago)
- Last Synced: 2025-04-13T09:54:55.029Z (9 months ago)
- Language: Rust
- Size: 10.7 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rust C++ New
[](https://travis-ci.org/sheredom/rust_cpp_new)
This Rust crate maps the C++ new/delete/new[]/delete[] operators via extern "C"
functions into Rust's allocators.
## How to Use
Just include the crate like:
```
extern crate cpp_new;
```
And it'll remap the C++ new/delete to Rust's global allcators.
## Where to Use
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.
## License
This code is licensed under the
[CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/) license,
which is a permissible public domain license.