‹ BackHN Continuity

Thread

What Zig felt like, coming from Rust

282 points · 351 comments · ksec

  1. computerfriend · · focus · HN ↗
    > Zig, by comparison, offered little beyond syntax highlighting and basic autocompletion.

    Zig has a language server and &quot;The majority of LSP features are supported&quot; (<a href="https:&#x2F;&#x2F;github.com&#x2F;zigtools&#x2F;zls#features" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;zigtools&#x2F;zls#features).

    1. cztomsik · · focus · HN ↗
      Zig had a breaking change half year ago and since then ZLS only works for std and local code, not for any deps. Zig is nice language but dev experience is a real nightmare at the moment. I say that as maintainer of three non-trivial libraries, and I have one Zig project in production.

      That said, I&#x27;ve been re-evaluating my choices lately.

      1. functional_dev · · focus · HN ↗
        Learned today why there is no &quot;zig metadata&quot; command. A dependency can be marked lazy, so whether you even need it depends on the build flags you pass.

        So ZLS has to actually run your &quot;build.zig&quot; to see the modules

        That is why it breaks when Zig changes the build system.

        <a href="https:&#x2F;&#x2F;vectree.io&#x2F;c&#x2F;zigs-build-system-protocol-module-graphs-buildzigzon-and-cargo-metadata" rel="nofollow">https:&#x2F;&#x2F;vectree.io&#x2F;c&#x2F;zigs-build-system-protocol-module-graph...

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.