Constant, compile-time `default` implementations in Rust
Sep 28, 2021You can find the source code here↗, the crate here↗ and the docs here↗. The problem You must have come across the Default trait several times while writing code in Rust, and it’s a great convenience for many. In case you haven’t, it lets us get a default value for a given type. This can be extremely useful in cases where, say if a value is not provided – you can default to a value appropriate for that type.
derived: Automating the boring stuff
Sep 25, 2021Background There are structs. Then there are huge structs. And then there are enormous structs. Last week, I was working on simplifying some structures at Skytable when I was really annoyed with a struct. No, let me not leave you there. It looked like this (module shown for a reason): mod cfgset { struct ConfigKeys { tls_cert: String, tls_key: String, tls_passin_stream: String, // ... some large number of other fields ... } } The problem:
Impact analysis: CVE-2021-37625
Aug 5, 2021Background Security issues happen, and one of them happened at Skytable last week. It began with my friend Martin writing a C# driver for Skytable. We were deep into discussing the implementation when he said that he wanted to include TLS as a part of the driver, which would obviously be an amazing thing to have. So, we issued self-signed certificates and he started working on the TLS component for the driver (since I’m not a C# person in any way,…
A little Earth and a little sky
Jul 14, 2021It all started back in 2020 when I was working on a project in stealth when I really lost my head on a database schema. (Let’s not say which database, but it started with the letter M). It really annoyed me. It bugged me every time I’d work on the project and finally, I was so fed up — I started writing a database. In the beginning it was really a REPL: you’d type in SET x y and the…