More Rust + Nix + Bindgen
How to set up nix packaging for a rust project which also links against an external C lib ? Well read on… First credit where credit is due, I base a lot of my understanding on this excellent article: link. The goal is to create a derivation to let nix build the rust lib but also a nix shell to let us do local development whilst sharing the same declared dependencies.
Read more…Freeswitch + Rust
On the face of it, the voip industry is a perfect candidate for rust: many of the flagship open source projects in the space are venerable C codebases which could benefit from rust’s safety improvements - I’ve seen first hand malicious actors crafting payloads to attack unpatched pointer errors. Its 2024 and sadly adoption isn’t forthcoming, with much of the industry battling ROI tensions in the post covid lockdown world. So my current project is very much a case of me ‘being the change you want to see’.
Read more…Rust + Nix Notes
Some nix + rust related notes after a weekend hacking around with bindgen, they might be helpful for the next person who wanders down this road. Bindgen Dependency Linking I’m continually impressed with the amount of documentation the rust eco-system maintains in order to help onboard new developers and bindgen is no exception. Following the book you’ll walk through a set of quick start tutorials and eventually setup a build.rs file.
Read more…Cross Platform SANSIO - Part 1
I really believe in cross platform… BUT! I would be the first person to say “not all code is worth sharing”, you have to pick your battles. Generally platform specific functionality is a pain to share because you end up being tasked with trying to wrap an API in a generalised abstraction that you hope will both hide platform complexity away but still be flexibile enough to accomodate. Practically speaking - its best to lean on existing libraries or frameworks here which is why things like Kotlin Multi Platform are popular, they’ve done alot of the heavy lifting already.
Read more…This one weird trick... with JS object keys
I’ve been reading the source of https://github.com/kirm/sip.js recently, and I stumbled upon a JS idiom which I had no idea about: function makeContextId(msg) { var via = msg.headers.via[0]; return [via.params.branch, via.protocol, via.host, via.port, msg.headers['call-id'], msg.headers.cseq.seq]; } // ... // Else where in the code var ctx = contexts[makeContextId(msg)]; REF: https://github.com/kirm/sip.js/blob/master/proxy.js I’ve known for a while JS objects must be keys or symbols, I even remember a particular developer poo pooing JS for the lack of flexibility.
Read more…Black Box Debugging iOS Binaries
Like many other companies in the space, Vonage relies on libwebrtc in it’s client-facing voice SDK. Just as I was going to take some leave, we had a peculiar issue pop up when we tried what we thought was a routine upgrade… our SDK was now causing App store uploads to fail! Ah, the joys of iOS development! For the uninitiated, getting your app onto the App Store involves navigating a series of infamous checks.
Read more…Thoughts on Kotlin Multiplatform
Also known as: My year in review! I recently helped create the content for a talk1 presented by my colleague Zachary Powell (@devwithzachary). It was the story of how our team migrated an existing public sdk to use KMP internally. I’m immensely proud of what we delivered and I wanted to take the time to expand on some of the points raised within the talk and figured this quiet corner of the internet offers enough space to tame the minutiae.
Read more…Hello World (Again...)
When I first began my attempt at blogging, one of the reasons behind the project was prove personal credibility. Self promotion via content marketing is a well defined career hack for developers 1 and I was ready to join the legion of misguided devs extolling the benefits of some inane feature of modern JS. The project ultimately failed though. Why? I made the mistake to think credibility only comes from being correct and being correct ALL THE TIME is hard!
Read more…