aa-sms – Send messages from Rust with Andrews & Arnold’s SMS API

I mentioned a few posts ago that I’d been learning a new programming language, and this post is the result of that work. I’m excited to announce the aa-sms library for sending SMS text messages from Rust with Andrews & Arnold’s APIs.

Screenshot of some example code using the aa-sms library to send an SMS text message

Before you can send messages using this library, you’ll need an account with Andrews and Arnold and be subscribed to their VoIP service with one or more phone numbers.

The library is available for installation from crates.io and can be added to your own Rust project with a simple cargo add aa-sms.

It’s built using the Builder pattern that seems common to Rust libraries and which I’ve previously known as a Fluent interface from my Java days. An example program using the library is included in the repository and can be launched by running cargo run --example send-library from the project’s root. Another example, this time using the reqwest library directly, is included for comparison and can be launched similarly, cargo run --example send-library.

A screenshot of an iPhone receiving an SMS sent using the aa-sms library

This code is at a very early stage, and I’m still new to rust and it’s idioms. So, please use it but be aware it comes with a massive caveat emptor. If anyone has any recommendations or fancies doing a wee code review, all constructive criticism is well received. I’ve already got a number of improvements I hope to make soon.

The source code is available from it’s git repository and is released as free software under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

2024-07-31

Leave a comment