Skip to content

Conversation

Copy link

Copilot AI commented Nov 9, 2025

Complete rewrite of the VCD viewer in Zig, replacing the C implementation.

Changes

  • Core implementation (vcd.zig): Direct port of C parsing and formatting logic using Zig's standard library

    • Adapted to Zig 0.15.2 API changes (unmanaged ArrayLists, File I/O patterns)
    • Added padding helpers to replace C-style format width specifiers
    • Enhanced timescale parser to handle both "1 fs" and "1ps" formats (ROHD compatibility)
  • Build system:

    • build.zig for native Zig builds
    • Updated Makefile to invoke zig build-exe
    • .gitignore for build artifacts
  • Documentation: Updated README with Zig installation requirements

Technical notes

Built in debug mode due to optimizer issues with complex ArrayList operations in the current Zig version. All functionality preserved including environment variable support and Unicode waveform rendering.

// Zig 0.15.2 uses unmanaged ArrayLists requiring explicit allocator passing
samples: ArrayList(Sample, null)  // Managed variant stores allocator
try ch.samples.append(.{ .state = 0, .val = 0 })

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/ziglang/zig/releases/latest
    • Triggering command: curl -s REDACTED (http block)
  • ziglang.org
    • Triggering command: wget -q REDACTED (dns block)
    • Triggering command: wget REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

migrate to zig


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Migrate project to Zig programming language Migrate from C to Zig Nov 9, 2025
Copilot AI requested a review from yne November 9, 2025 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants