4 ms·
Writing a SQL database, take two: Zig and RocksDB
- ok_dad 4y agoCool, I’m working on a FoundationDB C API wrapper and also a higher level set of abstractions over that, in Zig. It’s an absolute blast connecting C code to Zig because it’s so easy. It’s less like FFI and more like just importing a Zig module. In contrast, using not-specifically-designed C from Python is a nightmare and Lua is somewhere closer to Python than Zig. I haven’t tried Go FFI, but I hear it is pretty slow compared to pure Go. One downside is there are a lot of different pointers in Zig with C imports. This article will help for sure when I get to the stage where I want to write a query parser, thanks for sharing!
- bsaul 4y ago'pub const String = []const u8;' I know zig is still early stage, but the prospect of having to deal manually with unicode strings gives me the creep. What's the rational for not providing a package like this in the stdlib ?
- kristoff_it 4y agoThe stdlib is not yet the focus of development so we don't know precisely what should or should not be in the stdlib. This library implements the unicode spec and there have been talks about upstreaming it into the stdlib, but no decisions yet. https://github.com/jecolon/ziglyph https://github.com/jecolon/ziglyph