Closed Jonovono closed 1 year ago
Currently the swift client is a thin wrapper around the C library for convenience. As such, it doesn't have any bells and whistles like the Python client. For HTTP access to a server, I think using a dedicated HTTP client and parse the JSON output manually wouldn't be too difficult.
Thanks @zh217, ya, I might just do that. Should be simple enough. While I have you, have you looked into running CozoDB with Swift on server side? Where should I start if I want to explore that? I'm using the https://vapor.codes project. Wondering if it would make sense to get Cozo running this way or just have it as a seperate standalone http DB.
Unfortunately, no, and in fact I don't know the swift language very well. Nonetheless as Swift can call into C with no problem I don't think it would be too difficult to make it work. You can look at https://github.com/cozodb/cozo/blob/main/cozo-lib-c/cozo_c.h for the C API and https://github.com/cozodb/cozo/blob/main/scripts/build-release-linux.sh for hints about how to compile the library. Basically for compiling the C library you want
cargo build --release -p cozo_c -F compact -F storage-rocksdb
Hi, I am wondering if this is possible?
Similar to how in python you can: