Skip to content

[Bug]: Support for Zig 0.16.0 is missing. #7

Description

@ktarasov

TUI.zig Version

last

Zig Version

0.16.0

Platform

Linux

Bug Description

Support for Zig 0.16.0 is missing, despite what is stated in the README.md file.
There are a lot of errors when trying to compile any example from the examples directory. When reviewing the code, for example in the src/app.zig file, constructs that are not supported in version 0.16.0 are found. And there are a lot of such cases.

Steps to Reproduce

  1. zig init
  2. zig fetch --save git+https://github.com/muhammad-fiaz/tui.zig.git
  3. Add library tui to build.zig by instructions in README.md
  4. Copy content from file examples/demo.zig to your src/main.zig
  5. zig build

Expected Behavior

I expected the compilation to be error‑free and for the example to work correctly.

Minimal Reproducible Code

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

const Demo = struct {
    fn render(ctx: *tui.RenderContext) void {
        var sub = ctx.getSubScreen();
        sub.clear();
        sub.putStringAt(0, 0, "TUI.zig Demo\n\nExamples available in the examples/ directory. Use the demo runner to start them individually.");
    }
};

pub fn main(init: std.process.Init) !void {
    const io = init.io;

    var app = try tui.App.init(io, .{});
    defer app.deinit();

    const root = Demo{};
    try app.setRoot(&root);
    try app.run();
}

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions