Dev Log #2: Security Updates and Version Control Advances in Development Log

Table of contents
- Dynamic Version Handling: Fighting Manual Errors
- JSON Response Module: Building for Interoperability
- Language Module Integration: The First Step Toward Internationalization
- Security Enhancements: Building Trust
- The Message Bus: Connecting Everything
- AviScript Documentation: Making It Accessible
- The Enclosure System: Avi Everywhere
- Challenges and Lessons Learned
- What's Next?
- Final Thoughts

Last week I shared the early foundations of Avi, my Rust-based voice assistant framework. Today, I'm excited to update you on the progress I've made with version 0.1.31. While it might seem like a minor version bump from 0.1.3, there have been substantial improvements under the hood that I'm eager to share.
Dynamic Version Handling: Fighting Manual Errors
One of my biggest frustrations with the previous builds was keeping version numbers in sync across different files. I'd update the Cargo.toml but forget to change the version in the code, leading to inconsistent version reporting. I've solved this by creating a dynamic version.rs
module that automatically syncs with the package version.
This seems like a small change, but it's already saved me from several confusing debugging sessions where the reported version didn't match what I thought I was running!
JSON Response Module: Building for Interoperability
While working on the language integration, I realized that I needed a more structured way to handle responses between components. The ad-hoc string passing I was using previously wouldn't scale well, especially when thinking about the upcoming web interface and IoT integrations.
So I built a dedicated JSON response module with validation logic that gives me a consistent structure for all of Avi's responses, whether they're going to a voice synthesizer, a web client, or an IoT device. The validation logic helps catch problems early before they propagate through the system.
Language Module Integration: The First Step Toward Internationalization
The language management module has been a challenging but rewarding addition. I wanted to design something flexible enough to handle multiple languages but also efficient enough for real-time voice interactions.
I settled on a design that integrates tightly with the intent recognition system, allowing for language-specific intent patterns and responses. This is crucial for natural-sounding interactions across different languages. It's still early days for this feature, but the architecture is now in place for proper internationalization.
Security Enhancements: Building Trust
Security wasn't initially on my radar for such an early version, but after sharing the project, I received several questions about data handling and permissions. This prompted me to take a more proactive approach to security, starting with a comprehensive SECURITY.md
document.
I've also implemented permission restrictions in the CI/CD workflows, following the principle of least privilege, which prevents the CI/CD system from doing anything it doesn't explicitly need to do, reducing the potential attack surface.
The Message Bus: Connecting Everything
The message bus is taking shape as well. I've implemented a pub/sub system using rumqttd channels for asynchronous communication between modules. This allows for a clean separation of concerns while maintaining high performance.
The message bus is particularly important for the enclosure system, as it enables seamless communication between different Avi instances running on various devices. For example, a command given to an Avi instance on a smartphone could trigger actions on an Avi instance running on a smart home hub.
AviScript Documentation: Making It Accessible
One of the major milestones this week was completing the initial documentation for AviScript. The documentation covers the basic syntax, available functions, and provides examples of common patterns.
I've tried to make the documentation as approachable as possible, even for developers who aren't familiar with Rust. The goal is to enable anyone with basic programming knowledge to create their own skills for Avi.
You can check it out here AviScript.
Speaking of whitch I’m planing to remove the AviScript module from the core module add it to its one git repo and import it as a crate.
The Enclosure System: Avi Everywhere
One of the most exciting aspects of the project is the "Enclosure" system. An enclosure is essentially any physical device that can run Avi. This could be a desktop computer, a Raspberry Pi, a smart speaker, or even a tiny ESP32 microcontroller.
The enclosure system allows Avi to adapt to the capabilities of the device it's running on. For example, on a device with no screen, Avi would rely entirely on voice interaction. On a device with a screen but no microphone, Avi would default to text interaction.
This adaptability is key to Avi's vision of being available wherever you need it. The central Avi instance (usually running on a more powerful device) coordinates with satellite enclosures, creating a mesh of assistants that work together.
Challenges and Lessons Learned
The biggest challenge this week was refactoring the release workflow. I wanted to automate more of the process, but Rust's strict type system and GitHub Actions' peculiarities made this harder than expected.
I spent nearly a full day debugging why my release notes weren't being properly attached to releases, only to discover it was due to a subtle misunderstanding of how GitHub Actions handles multiline strings. The solution was to use a dedicated file for the notes and read that in rather than passing the content directly.
What's Next?
For the next release, I'll be focusing on three main areas:
Voice Processing Pipeline: Integrating wake word detection and a more sophisticated STT (Speech-to-Text) system.
Psychological Layer: Implementing the emotional analysis components I mentioned in my previous post.
AviScript Enhancements: Improving error handling and module imports to make skill development more intuitive.
I'm also planning to build a simple web interface that allows for testing Avi without having to set up a full voice system. This should make it easier for potential contributors to get involved.
Final Thoughts
This week's work on Avi has been less about adding flashy new features and more about building a solid foundation for future growth. The improvements to versioning, response handling, and security might not be immediately visible to users, but they make the system more robust and maintainable in the long run.
I'm learning that building a voice assistant is as much about the invisible infrastructure as it is about the user-facing capabilities. Each small improvement compounds, making the next feature easier to implement.
Until next time, happy coding!
Subscribe to my newsletter
Read articles from Apoll0_11 directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
