Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 32 additions & 54 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,59 +9,43 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v6
- name: Install rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.85.0
toolchain: 1.89.0
components: rustfmt
profile: minimal
override: true
- name: Run rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Check formatting
run: |
cargo fmt --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v6
with:
submodules: true
- name: Install rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.85.0
toolchain: 1.89.0
components: clippy
profile: minimal
override: true
- run: sudo apt update && sudo apt install -y libclang-dev
- name: Run clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all --tests -- -A clippy::upper-case-acronyms -A clippy::missing_safety_doc -D warnings

audit:
name: Security audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

run: |
make clippy

valgrind:
name: valgrind
runs-on: ubuntu-latest
steps:
- run: sudo apt update && sudo apt install -y valgrind libclang-dev
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v6
with:
submodules: true
- name: run test
Expand Down Expand Up @@ -92,14 +76,19 @@ jobs:
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
- name: Delete huge unnecessary tools folder
if: runner.os == 'Linux'
run: rm -rf /opt/hostedtoolcache
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v6
with:
submodules: true
- name: Install rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.85.0
toolchain: 1.89.0
target: ${{ matrix.target }}
profile: minimal
override: true
Expand All @@ -123,36 +112,25 @@ jobs:
run: clang --version && env
- name: Run librocksdb-sys tests
if: runner.os == 'Linux' || runner.os == 'Windows'
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=librocksdb-sys/Cargo.toml -vvvvv
run: |
cargo test --manifest-path=librocksdb-sys/Cargo.toml -vvvvv
- name: Run rocksdb tests
if: runner.os == 'Linux' || runner.os == 'Windows'
uses: actions-rs/cargo@v1
with:
command: test
run: |
cargo test
- name: Run rocksdb tests (jemalloc)
if: runner.os == 'Linux'
uses: actions-rs/cargo@v1
with:
command: test
args: --features jemalloc
run: |
cargo test --features jemalloc
- name: Run rocksdb tests (io-uring)
if: runner.os == 'Linux'
uses: actions-rs/cargo@v1
with:
command: test
args: --features io-uring
run: |
cargo test --features io-uring
- name: Run rocksdb tests (portable)
if: runner.os == 'Linux' || runner.os == 'macOS'
uses: actions-rs/cargo@v1
with:
command: test
args: --features portable
run: |
cargo test --features portable
- name: Run rocksdb tests (march-native)
if: runner.os == 'Linux'
uses: actions-rs/cargo@v1
with:
command: test
args: --features march-native
run: |
cargo test --features march-native
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ edition = "2024"
authors = ["Tyler Neely <t@jujit.su>", "David Greenberg <dsg123456789@gmail.com>", "Nervos Core Dev <dev@nervos.org>"]
license = "Apache-2.0"
keywords = ["database", "embedded", "LSM-tree", "persistence"]
repository = "https://github.com/nervosnetwork/rust-rocksdb"
repository = "https://github.com/nervosnetwork/ckb-rocksdb"
exclude = [
".gitignore",
"*.yml",
"tests",
"*.md",
"benches",
]
rust-version = "1.85.0"
rust-version = "1.89.0"

[features]
default = ["snappy", "lz4", "zstd", "zlib", "bzip2"]
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
rust-rocksdb
ckb-rocksdb
============
[![Build Status](https://github.com/nervosnetwork/rust-rocksdb/actions/workflows/rust.yml/badge.svg?branch=txn)](https://github.com/nervosnetwork/rust-rocksdb/actions/workflows/rust.yml?query=branch%3Atxn)
[![Build Status](https://github.com/nervosnetwork/ckb-rocksdb/actions/workflows/rust.yml/badge.svg)](https://github.com/nervosnetwork/ckb-rocksdb/actions/workflows/rust.yml?query=branch%3Amaster)
[![crates.io](https://img.shields.io/crates/v/ckb-rocksdb.svg)](https://crates.io/crates/ckb-rocksdb)
[![documentation](https://docs.rs/ckb-rocksdb/badge.svg)](https://docs.rs/ckb-rocksdb)
[![license](https://img.shields.io/crates/l/ckb-rocksdb.svg)](https://github.com/nervosnetwork/rust-rocksdb/blob/txn/LICENSE)
[![license](https://img.shields.io/crates/l/ckb-rocksdb.svg)](https://github.com/nervosnetwork/ckb-rocksdb/blob/master/LICENSE)
[![Discord](https://img.shields.io/badge/chat-on%20Discord-7289DA.svg)](https://discord.com/invite/nervos)


Expand Down
4 changes: 2 additions & 2 deletions librocksdb-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Karl Hobley <karlhobley10@gmail.com>", "Arkadiy Paronyan <arkadiy@et
license = "MIT/Apache-2.0/BSD-3-Clause"
description = "Native bindings to librocksdb"
readme = "README.md"
repository = "https://github.com/nervosnetwork/rust-rocksdb"
repository = "https://github.com/nervosnetwork/ckb-rocksdb"
keywords = [ "ffi", "rocksdb" ]

build = "build.rs"
Expand Down Expand Up @@ -49,7 +49,7 @@ uuid = { version = "1.0", features = ["v4"] }

[build-dependencies]
cc = { version = "1.0", features = ["parallel"] }
bindgen = { version = "0.71.1", default-features = false }
bindgen = { version = "0.72.1", default-features = false }
glob = "0.3.2"
pkg-config = "0.3"
rust-ini = "0.21"
2 changes: 1 addition & 1 deletion librocksdb-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::fs;
use std::path::PathBuf;
use std::process::Command;

const RUST_TARGET: &str = "1.85.0";
const RUST_TARGET: &str = "1.89.0";

fn get_flags_from_detect_platform_script() -> Option<Vec<String>> {
if !cfg!(target_os = "windows") {
Expand Down
2 changes: 1 addition & 1 deletion librocksdb-sys/snappy
3 changes: 2 additions & 1 deletion librocksdb-sys/tests/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
non_upper_case_globals,
unused_mut,
unused_unsafe,
unused_variables
unused_variables,
static_mut_refs
)]

#[macro_use]
Expand Down
2 changes: 1 addition & 1 deletion librocksdb-sys/zlib
Submodule zlib updated 171 files
2 changes: 1 addition & 1 deletion librocksdb-sys/zstd
Submodule zstd updated 545 files
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.85.0"
channel = "1.89.0"
16 changes: 8 additions & 8 deletions src/ops/multi_get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,22 +192,22 @@ where

pub trait BatchedMultiGetCF<R> {
fn batched_multi_get_cf_full<'a, K, I>(
&self,
&'a self,
cf: &ColumnFamily,
keys: I,
sorted_input: bool,
readopts: Option<&R>,
) -> Vec<Result<Option<DBPinnableSlice>, Error>>
) -> Vec<Result<Option<DBPinnableSlice<'a>>, Error>>
where
K: AsRef<[u8]> + 'a + ?Sized,
I: IntoIterator<Item = &'a K>;

fn batched_multi_get_cf<'a, K, I>(
&self,
&'a self,
cf: &ColumnFamily,
keys: I,
sorted_input: bool,
) -> Vec<Result<Option<DBPinnableSlice>, Error>>
) -> Vec<Result<Option<DBPinnableSlice<'a>>, Error>>
where
K: AsRef<[u8]> + 'a + ?Sized,
I: IntoIterator<Item = &'a K>,
Expand All @@ -216,12 +216,12 @@ pub trait BatchedMultiGetCF<R> {
}

fn batched_multi_get_cf_opt<'a, K, I>(
&self,
&'a self,
cf: &ColumnFamily,
keys: I,
sorted_input: bool,
readopts: &R,
) -> Vec<Result<Option<DBPinnableSlice>, Error>>
) -> Vec<Result<Option<DBPinnableSlice<'a>>, Error>>
where
K: AsRef<[u8]> + 'a + ?Sized,
I: IntoIterator<Item = &'a K>,
Expand All @@ -235,12 +235,12 @@ where
T: Handle<ffi::rocksdb_t> + super::Read,
{
fn batched_multi_get_cf_full<'a, K, I>(
&self,
&'a self,
cf: &ColumnFamily,
keys: I,
sorted_input: bool,
readopts: Option<&ReadOptions>,
) -> Vec<Result<Option<DBPinnableSlice>, Error>>
) -> Vec<Result<Option<DBPinnableSlice<'a>>, Error>>
where
K: AsRef<[u8]> + 'a + ?Sized,
I: IntoIterator<Item = &'a K>,
Expand Down
Loading