Closed truedat101 closed 6 years ago
This d-leveldb turned out to be trash, old, crashes.
Try out rocksdb. Need to figure out the build.
Need to get a rocksdb build done, and figure out a "clean" way to make this something that someone can do easily. Perhaps we need to add cmake?
Rocks install info: https://github.com/facebook/rocksdb/blob/master/INSTALL.md
So many packages are not well documented.
rocksdb just says have a library.
It is looking for leveldb.lib . If it finds it, I get:
.dub\build\shell-d-test-library-unittest-windows-x86_64-ldc_2077-058ABF0C1E61DA99DBEE00E965C6CA1F\shell-d-test-library.exe : fatal error LNK1120: 14 unresolved externals Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\link.exe failed with status: 1120 ldc2 failed with exit code 1120.
Either this build file issue, or the version of the library I built using vcpkg: .\vcpkg install rocksdb:x64-windows
is bad.
In fact, who knows what version of the vcpkg I got.
I'll file a bug against the rocksdb package to find out what version of rocksdb to use.
BTW, to build rocksdb on windows, use this: https://github.com/facebook/rocksdb/
and then
mkdir build && cmake -G "Visual Studio 15 2017 Win64" ..
Make sure to do this with the Win64 otherwise you get a broken package for a win64 target.
Rocksdb for d is here: https://github.com/b1naryth1ef/rocksdb
Filed a bug on that module: https://github.com/b1naryth1ef/rocksdb/issues/2
In the meantime, just building whatever master version of rocksdb for windows. This sucks. Everything is a bit easier on the not-windows.
Will check in on the build tomorrow. Why it's such a huge build for rocks db I don't know.
I'll add some dummy persistence layer right now.
I'm moving this out to proto2.
Moving it back.
@pedroalvesbatista you will need to run setup-deps.sh , make sure it grabs the rocksdb code, and you will need to manually build rocksdb (using cmake), and copy the rocksdb.so into your root of the project.
This gives us persistence. I've added an example into persistence.d.
We can work out better how to handle external deps later with cmake.
We can assume each client needs a small database for persistence. Please integrate leveldb for this purpose:
http://code.dlang.org/packages/d-leveldb
Please add to package.json. Add a sample use of this in the main app. Add a unit test to verify the integration.