feat: add __alloc
This commit is contained in:
@@ -6,6 +6,8 @@ Project or files:
|
||||
```
|
||||
.
|
||||
├── README_2.md
|
||||
├── __alloc
|
||||
│ └── zeroizing-alloc-demo
|
||||
├── __args
|
||||
│ ├── argh-test
|
||||
│ └── clap-test
|
||||
@@ -302,6 +304,6 @@ Project or files:
|
||||
├── vec.rs
|
||||
└── while.rs
|
||||
|
||||
274 directories, 38 files
|
||||
276 directories, 38 files
|
||||
```
|
||||
|
||||
|
||||
16
__alloc/zeroizing-alloc-demo/Cargo.lock
generated
Normal file
16
__alloc/zeroizing-alloc-demo/Cargo.lock
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "zeroizing-alloc"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ebff5e6b81c1c7dca2d0bd333b2006da48cb37dbcae5a8da888f31fcb3c19934"
|
||||
|
||||
[[package]]
|
||||
name = "zeroizing-alloc-demo"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"zeroizing-alloc",
|
||||
]
|
||||
7
__alloc/zeroizing-alloc-demo/Cargo.toml
Normal file
7
__alloc/zeroizing-alloc-demo/Cargo.toml
Normal file
@@ -0,0 +1,7 @@
|
||||
[package]
|
||||
name = "zeroizing-alloc-demo"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
zeroizing-alloc = "0.1.0"
|
||||
8
__alloc/zeroizing-alloc-demo/src/main.rs
Normal file
8
__alloc/zeroizing-alloc-demo/src/main.rs
Normal file
@@ -0,0 +1,8 @@
|
||||
use zeroizing_alloc::ZeroAlloc;
|
||||
|
||||
#[global_allocator]
|
||||
static ALLOC: ZeroAlloc<std::alloc::System> = ZeroAlloc(std::alloc::System);
|
||||
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
}
|
||||
Reference in New Issue
Block a user