vlang / v

Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
MIT License
35.5k stars 2.15k forks source link

Thin bindings for sled database (NoSQL) #3850

Open dumblob opened 4 years ago

dumblob commented 4 years ago

Currently there is lack of NoSQL support in V.

I think the sled DB is easy to integrate (it's written in Rust and exports C interface), extremely fast and really tiny (definitely smaller than SQLite). sled is also inherently multithreaded with highly scalable algorithms and overall very modern design while supporting ACID transactions etc. and can be tuned also for high-throughput and/or low-latency setups (it can even compete with in-memory DBs like Redis).

Of course such bindings would be a separate vpm package. Btw. is it possible to automatically generate V bindings for C interfaces?

nedpals commented 4 years ago

@dumblob prime31 has the tool for that: https://github.com/prime31/V-C-Wrapper-Generator

dumblob commented 4 years ago

@nedpals thanks for the pointer - it's interesting though, that it's written in C# :wink:. Any experience with the quality of the generated bindings?

@prime31 for which sources was the tool already used?

nedpals commented 4 years ago

@dumblob Haven't tried it yet but AFAIK it's been used in this module: https://github.com/vgtk/vgtk3

prime31 commented 4 years ago

@dumblob why would it matter what language a tool is written in? If it gets the job done who cares?

ive used the generator to wrap FMOD, Flecs, SDL, Kinc (an entire game engine), PhysicsFS and prolly half a dozen other libs I don’t use anymore.

dumblob commented 4 years ago

@dumblob why would it matter what language a tool is written in? If it gets the job done who cares?

My words. Absolutely agree. Sometimes things catch my eye without any deeper meaning :wink: (one might think that tools for V will be written in something closer to V).

ive used the generator to wrap FMOD, Flecs, SDL, Kinc (an entire game engine), PhysicsFS and prolly half a dozen other libs I don’t use anymore.

Sounds pretty solid. Thanks for the work!