Rust API with TLS Proof Of Concept with a little SQLite @CallousCoder
Rust API with TLS Proof Of Concept with a little SQLite  @CallousCoder
Uploaded October 2022 | Updated September 2026, 2 hours ago
github.com/rdoetjes/api_example

Disclaimer I am also learning Rust, so I may still, here and there, have a C++/Java mindset on doing things.

I needed a PoC:
I was talking to some colleagues that we could create a quick APi to circumvent the waiting times on an other department -- just to be prepared in case of eventuality. As a former project leader I learned to always "bet" on at least 2 horses.

At my customer we have (and rightly so) enormous security and life cycle demands on web services, they need to run, OAuth and mutal certification TLS and if you use frame works or runtimes you need to update those in a timely measure, putting an enormous development burden on the ETL team which is not their area of expertise. So I figured Rust could be the ideal solutions, it's safe it's a single binary that we can easily package into a Docker container and during my initial research I saw that Rocket 0.5.0 has TLS and mutual TLS and there's an (albeit young) rocket_oauth2 module -- which is working nicely. In order to be prepared for the eventuality, I wanted to gather hands on experience, so that when I would advise to go this route that I can deliver quickly and avoid the headaches that Java/C#/NodeJS would give us that also can do this -- and they are always a back scenario despite the life cycle management, that would be a pain for sure.

So as a PoC to test #rocket, I am making a #rust #web #api with #tls and to make it a bit more visually interesting for you guys, I'll add a little SQLite query method to it.
SQLite is brilliant for prototyping but it was the weak point of this PoC, the low-level C nature bleeds through into the Rust bindings. Having developed a lot sqlite in C/C++ I knew how to use it. But for a true "Rustacian" it would probably be a bit icky!!! I think Diesel is probably a better abstraction.
Rust API with TLS Proof Of Concept with a little SQLiteDonkey Kong Infinite Lives Hack, running on MiSTerWhole Matrix Trailer rendered in ASCIITrue Random Numbers with a C64 and RadiationPreview of new Mentalism Prediction SystemARM64 Assembly on Linux (part 3), bit shifting and printing hex numbersVectrex RefurbishA Stoner writes Forth in Zig???Repair and Bishop recreation for Novag Micro Chess computerArduino plays 1978 SIMON, perfectlySHATTERING THE 100M DASH RECORDMy AI has a better taste in men, than women!!!
CallousCoder |

Rust API with TLS Proof Of Concept with a little SQLite

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER