Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
R
rust-rocksdb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangzongwu
rust-rocksdb
Commits
ffa6daf2
Commit
ffa6daf2
authored
Nov 26, 2014
by
Tyler Neely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update readme
parent
f340e74c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
19 deletions
+37
-19
README.md
README.md
+37
-19
No files found.
README.md
View file @
ffa6daf2
...
...
@@ -3,28 +3,46 @@ rust-rocksdb
*
rust wrapper for rocksdb
*
development began 11/16/14
*
status: minimal functionality with poor style and an annoying interface
```
fn f() {
// arguments are path for rocksdb files, create if missing
let db = Rocksdb::open("testdb", true).unwrap();
db.put(b"a key", b"a value");
...
let r = db.get(b"this is key").unwrap();
db.close();
}
```
*
status (uncompleted tasks are not ranked by priority):
-
[
x
]
basic open/put/get/close
-
[
x
]
linux support
-
[
x
]
rocksdb itself retrieved and compiled via cargo
-
[
]
OSX support
-
[
]
windows support
-
[
]
batch
-
[
]
iterator
-
[
]
create/release snapshot
-
[
]
range
-
[
]
compaction filter, style
-
[
]
rustic merge operator
-
[
]
comparator
-
[
]
slicetransform
-
[
]
LRU cache
-
[
]
windows support
-
[
]
logger
-
[
]
column family operations
-
[
]
destroy/repair
### running
-
get rocksdb
-
Cargo.toml
```
git clone https://github.com/facebook/rocksdb
cd rocksdb
make shared_lib
[dependencies.rocksdb]
git = "https://github.com/spacejam/rust-rocksdb"
```
-
run tests
-
Code
```
LD_PRELOAD=/path/to/rocksdb/librocksdb.so cargo test
extern crate rocksdb;
fn main() {
let db = rocksdb::open("/path/to/db".to_string(), true).unwrap();
assert!(db.put(b"hey", b"v1111").is_ok());
db.get(b"hey").map( |raw| {
std::str::from_utf8(raw.as_slice()).map( |v| {
println!("value: {}", v);
})
});
db.close()
}
```
-
enjoy (as much as you can with such a poor current library! stay tuned!)
-
Feedback and pull requests welcome!
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment