urg_library_zig

urg_library_zig

This is a port of the URG library to the Zig build system. It does not provide any Zig bindings.

How to use it

Run any of the samples:

zig build get_distance
zig build get_distance_handshake
zig build get_distance_intensity
zig build get_multiecho
zig build get_multiecho_intensity
zig build sync_time_stamp
zig build sensor_parameter
zig build calculate_xy
zig build find_port
zig build timeout_test
zig build reboot_test
zig build angle_convert_test

Or any of the C++ samples:

zig build -Dcpp get_distance
zig build -Dcpp get_distance_handshake
zig build -Dcpp get_distance_intensity
zig build -Dcpp get_multiecho
zig build -Dcpp get_multiecho_intensity
zig build -Dcpp sync_time_stamp
zig build -Dcpp sensor_parameter

As a library

First, fetch this repository:

zig fetch --save git+https://github.com/JurMax/urg_library_zig

Next, add it to your build.zig:

const urg_dependency = b.dependency("urg_library_zig", .{
    .target = target,
    .optimize = optimize,
    .cpp = false, // Set to true to use the C++ bindings.
});
exe.root_module.linkLibrary(urg_dependency.artifact("urg_library"));

This will add the URG library and headers to exe.