https://github.com/sugarme/zmongo
mongodb client ziglang
https://github.com/sugarme/zmongo
mongoc mongodb mongodb-binding mongodb-client mongodb-driver zig zig-binding ziglang
Last synced: 5 months ago
JSON representation
mongodb client ziglang
- Host: GitHub
- URL: https://github.com/sugarme/zmongo
- Owner: sugarme
- License: other
- Created: 2024-03-06T11:21:27.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-21T11:23:58.000Z (about 2 years ago)
- Last Synced: 2024-03-21T12:37:28.315Z (about 2 years ago)
- Topics: mongoc, mongodb, mongodb-binding, mongodb-client, mongodb-driver, zig, zig-binding, ziglang
- Language: C
- Homepage:
- Size: 9.07 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zmongo
## What is it
`zmongo` is a wrapper to [official mongo-c-driver](https://github.com/mongodb/mongo-c-driver.git) - client [MongoDB](https://www.mongodb.com/) library.
It is meant to be a temporary solution to use `mongodb` database for ziglang until we have a native ziglang driver for mongodb.
- Current `mongo-c-driver` version **v1.26.1**.
- Current zig version **0.12.0-dev.2711+f995c1b08**.
- Tested only on Linux Debian 11/12. Make sure the following packages available
+ libssl-dev
+ openssl
+ libsasl2-dev
+ zstd-dev
+ libsnappy-dev
**NOTE**: package `libresolv` somehow cannot pickup when doing system library linking, [similar issue here](https://github.com/msantos/sods/issues/1#issuecomment-8002270) so its static mode is packed in `zmongo` (copied from /usr/lib/x86_64-linux-gnu/libresolv.a from Debian 11 system library).
**This is work in progress**
## How to use
See `example` for detail how to setup.
`example` can be run as following:
- Run mongodb server in docker: `bash ./libmongoc/mongodb-server.sh`.
- Run the example in `example` folder:
```bash
cd example
zig build run
```