Skip to content
Draft
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ CMakeCache.txt
cmake_install.cmake
CMakeFiles
build/
target/
build_debug/
build_release/
tmp/
Expand Down
6 changes: 5 additions & 1 deletion .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
"configurations": [
{
"name": "Linux",
"configurationProvider": "ms-vscode.cmake-tools"
"configurationProvider": "ms-vscode.cmake-tools",
"includePath": [
"${default}",
"${workspaceFolder}/include"
]
}
],
"version": 4
Expand Down
2 changes: 1 addition & 1 deletion go-ukv
6 changes: 6 additions & 0 deletions rust/.clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Right now we just use the defaults. This file exists should we
# want to change that, and to indicate to contributors that they
# might want to run clippy.
#
# See https://rust-lang.github.io/rust-clippy/master/index.html for
# the complete list of lints.
20 changes: 20 additions & 0 deletions rust/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# EditorConfig coding styles definitions. For more information about the
# properties used in this file, please see the EditorConfig documentation:
# http://editorconfig.org/

root = true

[*]
charset = utf-8
end_of_line = LF
indent_size = 4
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true

[*.{yml,json}]
indent_size = 2
indent_style = space

[*.{md,diff}]
trim_trailing_whitespace = false
25 changes: 25 additions & 0 deletions rust/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# CHANGELOG

## 26-01-2023

### Contributors

- chungquantin

### Added

- Database structure

```rs
struct Database {
db: UkvDatabaseInitType
}
```

- Build bindings to `cpp` header file in `include/ukv`. To generate bindings code stored, use `cargo build`. `build.rs` includes code to build bindings using `bindgen`
- Support two APIs: `ukv_database_init` and `ukv_database_free`
- Add clippy, rust-fmt and editor config file for formatting and linting

### Issues

- Can't generate bindings on file with linked source header. For example, generate on file `blobs.h` which includes `ukv/db.h` would throw error `No header file found`.
285 changes: 285 additions & 0 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[package]
name = "ukv"
version = "0.0.1"
publish = true
edition = "2021"
readme = "CARGO.md"
homepage = "https://github.com/unum-cloud/ukv"
repository = "https://github.com/unum-cloud/ukv"
documentation = "https://unum.cloud/ukv/rust/index.html"

[build-dependencies]
bindgen = "0.63.0"
cmake = "0.1.49"
fs_extra = "1.2.0"
num_cpus = "1.15.0"

[lib]
name = "ukv"

[features]
# Features for different backend implementations
# Library filenames:
# - libukv_embedded_umem
# - libukv_embedded_leveldb
# - libukv_embedded_rocksdb
# - libukv_flight_client
umem = []
leveldb = []
rocksdb = []
flight-server = []
flight-client = []
default = ["umem"]

Loading