main
Ziyang Hu 2 years ago
parent 023d32b6ec
commit 1e6211bc6e

3
.gitignore vendored

@ -13,4 +13,5 @@ Cargo.lock
# These are backup files generated by rustfmt
**/*.rs.bk
_path*
_path*
*.db

@ -14,4 +14,4 @@ chrono = "0.4"
anyhow = "1.0"
lazy_static = "1.4.0"
thiserror = "1.0.30"
cozo-rocks-sys = { path = "cozo-rocks-sys" }
cozo-rocks = { path = "cozo-rocks" }

@ -1,5 +1,5 @@
[package]
name = "cozo-rocks-sys"
name = "cozo-rocks"
version = "0.1.0"
edition = "2021"

@ -4,7 +4,7 @@ fn main() {
.include("../rocksdb/include")
.include("include")
.flag_if_supported("-std=c++17")
.compile("rocksdb-sys");
.compile("cozo-rocks");
println!("cargo:rustc-link-search=rocksdb/");
println!("cargo:rustc-link-lib=rocksdb");

@ -3,7 +3,7 @@
//
#include "cozorocks.h"
#include "cozo-rocks-sys/src/lib.rs.h"
#include "cozo-rocks/src/lib.rs.h"
void write_status_impl(Status &status, StatusCode code, StatusSubCode subcode, StatusSeverity severity) {
status.code = code;

@ -59,7 +59,7 @@ mod ffi {
}
unsafe extern "C++" {
include!("cozo-rocks-sys/include/cozorocks.h");
include!("cozo-rocks/include/cozorocks.h");
type StatusCode;
type StatusSubCode;

@ -75,14 +75,14 @@ mod tests {
#[test]
fn import() {
use cozo_rocks_sys::*;
use cozo_rocks::*;
let db = DB::open(Options::default()
.increase_parallelism()
.optimize_level_style_compaction()
.set_create_if_missing(true)
.set_comparator("cozo_comparator_v1", cozo_comparator_v1),
"xxyyzz");
"xxyyzz.db");
let mut x = vec![];
let mut builder = ByteArrayBuilder::new(&mut x);

Loading…
Cancel
Save