Skip to content

Commit

Permalink
Redesign Options and constructors (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
al8n authored Sep 21, 2024
1 parent 915694d commit feb0737
Show file tree
Hide file tree
Showing 14 changed files with 1,431 additions and 534 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,31 @@ jobs:
# run: valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./target/debug/foo
# working-directory: integration

docs:
name: docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache cargo build and registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ubuntu-latest-docs-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
ubuntu-latest-docs-
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.nightly }}
override: true
- name: "doc --lib --all-features"
run: cargo doc --lib --no-deps --all-features
env:
RUSTFLAGS: --cfg docsrs
RUSTDOCFLAGS: --cfg docsrs -Dwarnings

coverage:
name: coverage
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "orderwal"
version = "0.2.1"
version = "0.3.0"
edition = "2021"
repository = "https://github.com/al8n/orderwal"
homepage = "https://github.com/al8n/orderwal"
Expand All @@ -27,7 +27,7 @@ xxhash64 = ["dbutils/xxhash64", "std"]
among = { version = "0.1", default-features = false, features = ["either"] }
bitflags = { version = "1", default-features = false }
dbutils = { version = "0.3", default-features = false, features = ["crc32fast"] }
rarena-allocator = { version = "0.2", default-features = false, features = ["memmap"] }
rarena-allocator = { version = "0.3", default-features = false, features = ["memmap"] }
crossbeam-skiplist = { version = "0.1", default-features = false, package = "crossbeam-skiplist-pr1132" }
paste = "1"
thiserror = "1"
Expand Down
13 changes: 5 additions & 8 deletions examples/zero_cost.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use std::{cmp, sync::Arc, thread::spawn};
use orderwal::{
swmr::generic::{Comparable, Equivalent, GenericBuilder, KeyRef, Type, TypeRef},
utils::*,
OpenOptions,
};

#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
Expand Down Expand Up @@ -137,13 +136,11 @@ fn main() {

let mut wal = unsafe {
GenericBuilder::new()
.map_mut::<Person, String, _>(
&path,
OpenOptions::new()
.create_new(Some(1024 * 1024))
.write(true)
.read(true),
)
.with_capacity(1024 * 1024)
.with_create_new(true)
.with_read(true)
.with_write(true)
.map_mut::<Person, String, _>(&path)
.unwrap()
};

Expand Down
Loading

0 comments on commit feb0737

Please sign in to comment.