Skip to content
dfrojasPublic

About

Zig library to read and write dive plans in UDDF.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

OpenWater

Zig library to read and write dive plans in UDDF format

Note

As with most things built in 2026, OpenWater's code was generated with AI tools under close human supervision.

Usage

As a library

const std = @import("std");
const openwater = @import("openwater");

const input = // ... UDDF XML bytes ...

var out = std.Io.Writer.Allocating.init(allocator);
defer out.deinit();
try openwater.convert(allocator, .uddf_xml, input, .dive_json_v1, &out.writer);

From the CLI

openwater --input plan.uddf.xml --output dive.json

The CLI calls the library. The library is the engine. The library can also be used in other external Zig packages.

Input and output formats are chosen from the file extensions (.uddf, .xml, .json). Vendor dive dumps (.dlf, .bin, .raw) require --family (and optionally --model), parsed via libdivecomputer:

openwater --input dive.dlf --output dive.uddf --family freedom

Why

I like to learn by working on real projects. I'm using my passion for diving to learn a new programming language.

Test and run

Requires Zig 0.17.0. With Nix, the flake dev shell pins the same compiler as CI. Dependencies fetch from build.zig.zon when you build inside the shell.

nix flake check
nix develop -c zig fmt --check build.zig build.zig.zon src
nix develop -c zig build test
nix develop -c zig build run -- --input plan.uddf.xml --output dive.json

Without Nix:

zig build test
zig build run -- --input plan.uddf.xml --output dive.json

About

Zig library to read and write dive plans in UDDF.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages