move around
parent
f5d05a17b3
commit
d08df22306
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "rocksdb"]
|
||||||
|
path = rocksdb
|
||||||
|
url = https://github.com/facebook/rocksdb
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$/cozo-rocks">
|
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$/cozorocks">
|
||||||
<contentRoot DIR="$PROJECT_DIR$" />
|
<contentRoot DIR="$PROJECT_DIR$" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
@ -0,0 +1,19 @@
|
|||||||
|
cd rocksdb || exit
|
||||||
|
make clean
|
||||||
|
INSTALL_DIR=$(readlink -f ../deps)
|
||||||
|
echo "$INSTALL_DIR"
|
||||||
|
rm -fr "$INSTALL_DIR"
|
||||||
|
mkdir "$INSTALL_DIR"
|
||||||
|
|
||||||
|
export JEMALLOC_BASE=/opt/homebrew
|
||||||
|
|
||||||
|
JEMALLOC_INCLUDE=" -I $JEMALLOC_BASE/include/" \
|
||||||
|
JEMALLOC_LIB=" $JEMALLOC_BASE/lib/libjemalloc.a" \
|
||||||
|
USE_RTTI=1 \
|
||||||
|
USE_CLANG=1 \
|
||||||
|
JEMALLOC=1 \
|
||||||
|
PREFIX=$INSTALL_DIR \
|
||||||
|
make install-static
|
||||||
|
|
||||||
|
DEBUG_LEVEL=0 make libz.a libsnappy.a liblz4.a libzstd.a
|
||||||
|
mv ./*.a ../deps/lib
|
@ -1,16 +0,0 @@
|
|||||||
fn main() {
|
|
||||||
cxx_build::bridge("src/lib.rs")
|
|
||||||
.file("src/cozorocks.cc")
|
|
||||||
.include("../rocksdb/include")
|
|
||||||
.include("include")
|
|
||||||
.flag_if_supported("-std=c++17")
|
|
||||||
.compile("cozo-rocks");
|
|
||||||
|
|
||||||
println!("cargo:rustc-link-search=rocksdb/");
|
|
||||||
println!("cargo:rustc-link-lib=rocksdb");
|
|
||||||
println!("cargo:rustc-link-lib=z");
|
|
||||||
println!("cargo:rustc-link-lib=bz2");
|
|
||||||
println!("cargo:rerun-if-changed=src/main.rs");
|
|
||||||
println!("cargo:rerun-if-changed=src/cozorocks.cc");
|
|
||||||
println!("cargo:rerun-if-changed=include/cozorocks.h");
|
|
||||||
}
|
|
@ -0,0 +1,86 @@
|
|||||||
|
### CMake template
|
||||||
|
CMakeLists.txt.user
|
||||||
|
CMakeCache.txt
|
||||||
|
CMakeFiles
|
||||||
|
CMakeScripts
|
||||||
|
Testing
|
||||||
|
Makefile
|
||||||
|
cmake_install.cmake
|
||||||
|
install_manifest.txt
|
||||||
|
compile_commands.json
|
||||||
|
CTestTestfile.cmake
|
||||||
|
_deps
|
||||||
|
|
||||||
|
### JetBrains template
|
||||||
|
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||||
|
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||||
|
|
||||||
|
# User-specific stuff
|
||||||
|
.idea/**/workspace.xml
|
||||||
|
.idea/**/tasks.xml
|
||||||
|
.idea/**/usage.statistics.xml
|
||||||
|
.idea/**/dictionaries
|
||||||
|
.idea/**/shelf
|
||||||
|
|
||||||
|
# Generated files
|
||||||
|
.idea/**/contentModel.xml
|
||||||
|
|
||||||
|
# Sensitive or high-churn files
|
||||||
|
.idea/**/dataSources/
|
||||||
|
.idea/**/dataSources.ids
|
||||||
|
.idea/**/dataSources.local.xml
|
||||||
|
.idea/**/sqlDataSources.xml
|
||||||
|
.idea/**/dynamic.xml
|
||||||
|
.idea/**/uiDesigner.xml
|
||||||
|
.idea/**/dbnavigator.xml
|
||||||
|
|
||||||
|
# Gradle
|
||||||
|
.idea/**/gradle.xml
|
||||||
|
.idea/**/libraries
|
||||||
|
|
||||||
|
# Gradle and Maven with auto-import
|
||||||
|
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||||
|
# since they will be recreated, and may cause churn. Uncomment if using
|
||||||
|
# auto-import.
|
||||||
|
# .idea/artifacts
|
||||||
|
# .idea/compiler.xml
|
||||||
|
# .idea/jarRepositories.xml
|
||||||
|
# .idea/modules.xml
|
||||||
|
# .idea/*.iml
|
||||||
|
# .idea/modules
|
||||||
|
# *.iml
|
||||||
|
# *.ipr
|
||||||
|
|
||||||
|
# CMake
|
||||||
|
cmake-build-*/
|
||||||
|
|
||||||
|
# Mongo Explorer plugin
|
||||||
|
.idea/**/mongoSettings.xml
|
||||||
|
|
||||||
|
# File-based project format
|
||||||
|
*.iws
|
||||||
|
|
||||||
|
# IntelliJ
|
||||||
|
out/
|
||||||
|
|
||||||
|
# mpeltonen/sbt-idea plugin
|
||||||
|
.idea_modules/
|
||||||
|
|
||||||
|
# JIRA plugin
|
||||||
|
atlassian-ide-plugin.xml
|
||||||
|
|
||||||
|
# Cursive Clojure plugin
|
||||||
|
.idea/replstate.xml
|
||||||
|
|
||||||
|
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||||
|
com_crashlytics_export_strings.xml
|
||||||
|
crashlytics.properties
|
||||||
|
crashlytics-build.properties
|
||||||
|
fabric.properties
|
||||||
|
|
||||||
|
# Editor-based Rest Client
|
||||||
|
.idea/httpRequests
|
||||||
|
|
||||||
|
# Android studio 3.1+ serialized cache file
|
||||||
|
.idea/caches/build_file_checksums.ser
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cozo-rocks"
|
name = "cozorocks"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
@ -0,0 +1,19 @@
|
|||||||
|
fn main() {
|
||||||
|
cxx_build::bridge("src/lib.rs")
|
||||||
|
.file("bridge/cozorocks.cc")
|
||||||
|
.include("../deps/include")
|
||||||
|
.include("bridge")
|
||||||
|
.flag_if_supported("-std=c++17")
|
||||||
|
.compile("cozorocks");
|
||||||
|
|
||||||
|
println!("cargo:rustc-link-search=deps/lib/");
|
||||||
|
println!("cargo:rustc-link-lib=rocksdb");
|
||||||
|
println!("cargo:rustc-link-lib=z");
|
||||||
|
println!("cargo:rustc-link-lib=bz2");
|
||||||
|
println!("cargo:rustc-link-lib=lz4");
|
||||||
|
println!("cargo:rustc-link-lib=snappy");
|
||||||
|
println!("cargo:rustc-link-lib=zstd");
|
||||||
|
println!("cargo:rerun-if-changed=src/main.rs");
|
||||||
|
println!("cargo:rerun-if-changed=bridge/cozorocks.cc");
|
||||||
|
println!("cargo:rerun-if-changed=bridge/cozorocks.h");
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
Subproject commit ee6ee5ff08d32fb325d8768139305a3227025b0e
|
Loading…
Reference in New Issue