dqlite icon indicating copy to clipboard operation
dqlite copied to clipboard

CMake support

Open taraxacum45e9a opened this issue 6 years ago • 6 comments

taraxacum45e9a avatar Apr 11 '20 15:04 taraxacum45e9a

No plans for now. Patches are welcome if you need it.

freeekanayaka avatar Apr 11 '20 17:04 freeekanayaka

Okay I don't know much about autotools, but I'll try to do it.

taraxacum45e9a avatar Apr 12 '20 01:04 taraxacum45e9a

I have started to work on amalgamation support, basically there's a script that concatenates all files and outputs just two files raft.c and raft.h that you can drop into your project. If the reason you want to have CMake support is because you need to integrate with CMake project, it will probably be easier to just copy raft.c and raft.h into your project source tree.

See the Travis configuration here to see how you can generate raft.c and raft.h. Basically it's

git clone --depth 1 https://github.com/edlund/amalgamate.git
export PATH=$PATH:$PWD/amalgamate
amalgamate.py --config=amalgamation.json --source=$(pwd)

from your raft checkout directory.

freeekanayaka avatar Apr 12 '20 10:04 freeekanayaka

Thank you! That's a great solution. But I'm going to use this library in Intel SGX, where libuv and syscall are not supported. Thus I might have to do some modification on amalgamation.json. But it's pretty easier.

Thanks again

taraxacum45e9a avatar Apr 14 '20 06:04 taraxacum45e9a

Thank you! That's a great solution. But I'm going to use this library in Intel SGX, where libuv and syscall are not supported.

Are you planning to code your own version of the raft_io interface the? Since libuv is not available.

That might be quite a bit of work. I'm slowing decoupling a lot of logic from libuv to eventually make it easier to implement alternate backends, however it will take me some time and I don't have a timeline, since I'm doing it on my spare time. You might be interested in that.

freeekanayaka avatar Apr 14 '20 08:04 freeekanayaka

No plans for now. Patches are welcome if you need it.

I'd love to do that, but where can I find documentation on compilation standards?Or do you just need to ensure that the compilation passes and can be used normally?

growdu avatar Oct 29 '22 11:10 growdu