<img alt="" src="https://secure.beer7live.com/220831.png" style="display:none;">

The J2 Innovations' blog

The home of smart buildings, smart equipment and IoT

A New Open-source Library for Project Haystack – Rust

Copy of haystack-core

Last April we announced the release of a TypeScript-based Project Haystack 4 open-source library called ‘Haystack Core’ to help developers create smart building and IoT applications more easily and faster. Since then, a team within J2 Innovations has been creating another Rust-based high-performance library.

We caught up with one of the core team who developed the library, Enterprise Software Architect at J2 Innovations, Radu Racariu:


Why was another Haystack implementation required?

The new Rust open-source library was developed as part of an internal working group looking at how to better develop software using project Haystack tagging. It complements the existing Haystack Core library which uses TypeScript implementation that is geared towards more Web centric applications - such as Web Applications and REST Services. The Rust implementation will suit embedded or high-performance applications and will allow Haystack vendors to create better Haystack-based solutions. For example, embedding a Haystack solution in a thermostat is currently challenging due to the advanced hardware required at additional cost. Using this library could negate this need.


Why did J2 Innovations pick Rust for this?

J2 Innovations is always looking for technologies that can be both efficient and secure, and as our core offering is IoT and BAS, we need to be ahead of the curve in delivering the state-of-the-art technology. Although Rust is a relatively new programming language, it is gaining traction in replacing C/C++ for high-performance applications as it offers a radical new approach to security and reliability.

What does the library offer?

The ‘Rust haystacklib’ offers a great deal of functionality in terms of Haystack 4 specification. We offer Haystack 4 types: JSON and ZINC encoders, Haystack 4 filters, Units, Def namespace and a C compatible API for interoperability with C/C++ solutions or any other language that can do C ABI interop, such as Python.

J2 Innovations’ ‘Rust haystacklib’ is available to all under a permissive Open-Source license; we are a supporter of the collaborative and open way to address fundamental engineering problems that can help the industry.

Where can the library be accessed?

The source code is available at github.com/j2inn/libhaystack and the Rust package and the documentation are available at crates.io/crates/libhaystack


Thanks to all the Stack team members who helped develop the library alongside Radu.

Jenny Evans

Jenny transferred from the Siemens UK&I Smart Infrastructure communications team to J2 in 2020. Jenny is passionate about the building technology industry and brings over 14 years of experience in marketing, communications and strategy. Outside of work, she is captain of a local field hockey team and enjoys taking her chihuahuas on walks.

View all articles

Topics from this blog: J2 News & Events Project Haystack

Back to all posts