Announcement
· Oct 24

[Video] Building $ZF Modules in Rust with RZF

Hey Community!

We're happy to share a new video from our InterSystems Developers YouTube:

⏯  Building $ZF Modules in Rust with RZF @ Ready 2025
 

https://www.youtube.com/embed/ZCxVle93VpQ
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

Noah, a developer on the DARPA team with Dave McCalden, introduces Rust ZF - a new Rust-based layer for the Iris ZF (Zero Functions) API. Traditionally, ZF allows calling in and out of IRIS using C, but it’s verbose and lacks type and memory safety.

The new Rust ZF adds an ergonomic, idiomatic Rust interface, making it easier and safer for developers to integrate Rust code with Iris. Using a simple macro (RZF), developers can define functions in Rust, build dynamic libraries, and load them into IRIS, or call IRIS methods directly from Rust. Noah demonstrates this with examples like math functions and real-time code execution.

He also shows how Rust’s ecosystem can integrate with IRIS, for example, using the Bevy game engine to create a Space Invaders demo that stores and retrieves game data through IRIS. Finally, he mentions ongoing work on an LLM MCP server that will be covered in a future presentation by Dave McCalden.

🗣 Presenter: @Noah Dohrmann, Developer DARPA team

Enjoy watching, and subscribe for more videos! 👍

Discussion (3)4
Log in or sign up to continue

Hi, sorry for the late reply! (I did not receive a notification unfortunately)

Let's say you have a simple add function as follows:

#[rzf::rzf]
fn add(left: i64, right: i64) -> i64 {
    left + right
}

and you call the initialize macro in your lib.rs:
 

rzf::init!();

After building the project with cargo, you should have, for example, a "libmyproj.dylib" file if your project is named "myproj" and you are on macOS (or .dll if on MS Windows). Then, in an IRIS terminal, you can call the function with:

write $zf(-3, "/path/to/libmyproj.dylib", "add", 1, 3)

This will print 4 to the stdout of the terminal.

Thanks so much for your question! We will make more information regarding installation/use of RZF available soon when the corresponding Rust crate is published.

Best,

Noah