mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-11 14:41:16 -07:00
vecs: init
This commit is contained in:
12
crates/brk_vecs/examples/main.rs
Normal file
12
crates/brk_vecs/examples/main.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
use std::path::Path;
|
||||
|
||||
use brk_core::Result;
|
||||
use brk_vecs::{File, PAGE_SIZE};
|
||||
|
||||
fn main() -> Result<()> {
|
||||
let file = File::open(Path::new("vecs"))?;
|
||||
|
||||
file.grow_if_needed(PAGE_SIZE * 1_000_000)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user