Skip to content

Commit

Permalink
Add LZ4 Support
Browse files Browse the repository at this point in the history
  • Loading branch information
0xpablo committed Jan 4, 2023
1 parent 49487b4 commit 0224ab5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "rocksdb"]
path = rocksdb
url = https://github.com/facebook/rocksdb.git
[submodule "lz4"]
path = lz4
url = [email protected]:lz4/lz4.git
23 changes: 4 additions & 19 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ let package = Package(
exclude: [
"RocksDBWriteBatchIterator+Private.h",


"RocksDBColumnFamilyMetadata.h",
"RocksDBIndexedWriteBatch.h",
"RocksDBWriteBatchIterator.h",
Expand All @@ -52,24 +51,13 @@ let package = Package(
"RocksDBBackupEngine.mm",
"RocksDBBackupInfo.mm",


"RocksDBError.h",
"RocksDBSlice.h",

"RocksDBCallbackAssociativeMergeOperator.h",
"RocksDBCallbackComparator.h",
"RocksDBCallbackMergeOperator.h",
"RocksDBCallbackSliceTransform.h",

// "RocksDB+Private.h",
// "RocksDBColumnFamily+Private.h",
// "RocksDBColumnFamilyMetaData+Private.h",
// "RocksDBCompactRangeOptions+Private.h",
// "RocksDBIndexedWriteBatch+Private.h",
// "RocksDBIterator+Private.h",
// "RocksDBOptions+Private.h",
// "RocksDBSnapshot+Private.h",
// "RocksDBWriteBatch+Private.h",
],
publicHeadersPath: "./",
cxxSettings: [
Expand Down Expand Up @@ -325,14 +313,14 @@ let package = Package(
"rocksdb/options",
"rocksdb/port",
"rocksdb/table",
// "test_util",
"rocksdb/trace_replay",
"rocksdb/util",
"rocksdb/utilities",
],
publicHeadersPath: "rocksdb/include",
cxxSettings: [
.headerSearchPath("./rocksdb"),
.headerSearchPath("./lz4/lib"),
.define("ROCKSDB_LITE"),
.define("NROCKSDB_THREAD_STATUS"),
.define("IOS_CROSS_COMPILE", .when(platforms: [.iOS])),
Expand All @@ -341,14 +329,11 @@ let package = Package(
.define("PORTABLE"),
.define("OS_MACOSX"),
.define("NDEBUG"),
.define("NPERF_CONTEXT"), // TODO: Check
.define("NIOSTATS_CONTEXT"), // TODO: Check
.define("NPERF_CONTEXT"),
.define("NIOSTATS_CONTEXT"),
.define("LZ4")
]
),

// .testTarget(
// name: "ObjectiveRocksTests",
// dependencies: ["ObjectiveRocks"]),
],
cxxLanguageStandard: .cxx11
)
1 change: 1 addition & 0 deletions lz4
Submodule lz4 added at 5ff839

0 comments on commit 0224ab5

Please sign in to comment.