nim-rocksdb/rocksdb.nimble
web3-developer 90027f1875
Support for static linking RocksDb. (#40)
* Added rocksdb as a submodule in vendor directory.

* Add support for static linking using nimble.

* Add script to build static library dependencies.

* Disable warnings as error in deps build.

* Set recommended compression options in build and in library.

* Move static linking into wrapper code.

* Conditionally set linker using when defined(macosx).

* Add support for linking windows static libraries.

* Build rocksdb static libs using vcpkg.

* Remove lib prefix from library names for windows.

* Static linking is not supported on windows. Update documentation and CI.
2024-03-27 14:18:21 +08:00

26 lines
822 B
Nim

packageName = "rocksdb"
version = "0.4.0"
author = "Status Research & Development GmbH"
description = "A wrapper for Facebook's RocksDB, an embeddable, persistent key-value store for fast storage"
license = "Apache License 2.0 or GPLv2"
skipDirs = @["examples", "tests"]
mode = ScriptMode.Verbose
### Dependencies
requires "nim >= 1.6",
"results",
"tempfile",
"unittest2"
task clean, "Remove temporary files":
exec "rm -rf build"
exec "make -C vendor/rocksdb clean"
task test, "Run tests":
exec "nim c -r --threads:on tests/test_all.nim"
task test_static, "Run tests after static linking dependencies":
when not defined(windows):
exec "scripts/build_static_deps.sh"
exec "nim c -d:rocksdb_static_linking -r --threads:on tests/test_all.nim"