Inventory Management System (with Rust & React): Part 2 - Planning for Production

Posted in Hobbies > Homelab: Virtualisation & Services > Tidy - Inventory Management

With my initial focus on the Rust API, I made sure to enable Github CI and ensure my test suite would run its full gamut of tests on every push of a commit. Other good practices involve
  • Use of ENV vars (this is pretty basic)
  • Use of dotenv, for both dev and production, of course.
  • Taking a Docker first approach (more on this later...)
Of course, an ideal DevOps solution would introduce a build-pipeline; there are many options in this space from the likes of Jenkins to GoCD, although a local GitLab instance can do all of this including hosting of a container registry. Instead, I decided to take a "scrappier" approach (for now), with simply Docker.  For those wondering, my local GoCD instance hasn't been involved in this project (yet).

The Homelab Stack

My Homelab produc ...(continued)

Building an Inventory Management System (from scratch) with Rust and React

Posted in Hobbies > Homelab: Virtualisation & Services > Tidy - Inventory Management

I don't always set myself hard to obtain goals, as you know, "ambition is the last refuge of failure". No, I haven't failed!
Look at those sexy UUIDs.  Oh my!
The premise was simple.  I wanted to create a "simple" Rust backend API that would basically be a RUST API around a Postgres DB.  The other part is of course the frontend; at the started I didn't put too much stock into this until I had the Rust API out of the way.
Much of the initial Rust work was in setting up the boilerplate Axum handlers, getting a test-harness setup for end-to- ...(continued)

Embedded Rust: Adding a Type-safe SNTP callback (to esp-idf-svc)

From my work on rued, I wanted to use the callback defined in esp-idf-sys, but these are the C bindings. The esp-idf-sys crate implements type-safe Rust wrappers.
My initial use and testing in rued involved manipulating the raw-C bindings themselves, along the lines of unsafe extern "C" fn sync_cb(tv: *mut esp_idf_sys::timeval). While I did this just to "get things to work", there is a reason why there is a HAL (hardware-abstraction layer) provided in Rust.
So, it was time to contribute back to the community effort of a Rust-based HAL. To this effort, I created a PR called Add wrapper to specify callback for SNTP. ...(continued)

Initial LED Driver functional verification

Posted in Hobbies > PCB Designs > Cree LED Strip

Having received the previously designed low-side LED driver PCBs, it was time to perform some initial functional tests.  The usual process here is to check for potential shorts and waveforms on the board, essentially checking components/stages 'block' by block.
The initial setup took some time as I not only had to solder the PTH components (Plated-through hole) such as the jumper headers but also various power, test and output leads as well. Ideally I would have not used my DC electronic load for initial testing but I sadly ran out of high-wattage wirewound resistors on hand.

Building an Embedded Rust Stack for ESP32

Posted in Hobbies > Electronics Projects > ESP32-based IoT Stack in Rust

I wanted to take my Rust skills into the Embedded eco-system and for a good long time, spent way too much time trying to re-invent a certain wheel (nothing to do with Rust, though) - more to do with choosing the 'right' MCU SOC for the job.
RTC module is the smaller board at the top (which has a small battery) and connects via I2C with the ESP32 that's on the smaller board in the M.2 socket.
My biggest issue is I wanted it to be capable of everything and anything, but in the embedded world, constraints are always part of the designing stage.  It's hard to say optimise for work-horse performance and say ...(continued)

Rust for Embedded is Better on x86

Having recently picked up a M1 Max MacBook Pro, in hindsight I expected to run into some issues due to the change in CPU architecture.
For some the idea of 64GB RAM is excessive, but if you've been pushing Mac's to their limit as long as I have - I've been running 32GB RAM defacto for over a decade.  It doesn't take many tabs in Chrome to exhaust 16GB RAM.
Here's a snap of running some heavy IO in Docker:
Running both Glances and Htop

Designing the LED Driver PCB

Posted in Hobbies > PCB Designs > Cree LED Strip

Updated: Nov 18th: Here's a quick update from the Fab house as they are performing QC on the assembly of the new boards
SMT parts have been populated
I decided to make this a MicroMod Function board, and also threw in an extra footprint to stack on a RTC board as well. The RTC board is the SparkFun Real Time Clock Module - RV-8803.
Here are some progress snaps of the board layout:

Troubleshooting Cross-account VPC Peering

Posted in Work > AWS: Cloud Solutions > VPC Peering

On Tuesday I was setting up VPC Peering and even had a colleague double check my setup.  This one was a tricky one as I had got everything correct, but missing one small configuration.
Here's the Requester side of the connection:
And the Accepter side.  Notice that I've used separate CIDR blocks (as per the requirements) to establish the connection.

Post Archive