Use-case: "given zig in PATH (or a full path to the executable) have a way for it to output what stdlib path it would default to (if not overridden) for a build or other compile operation. Possibly also include default cache-path it would default to from cwd if not overridden.
This could be a new subcommand such as zig info / zig paths or simply additional indented lines to zig version. If showing more than 1 path (ie. others than stdlib location), could go either for NAME=value lines or a JSON dict I guess.
I like zig info and I further propose:
zig targets in outputting JSON formatlib/std)zig id can be deprecated)zig version can be redundant)I think this will help projects like zls a lot too!
Is anyone already working on this? I'd like to try it
Ok, assuming that no one is working on this. @metaleap, @andrewrk correct me if I'm wrong
similar to go env
[nix-shell:~/Downloads/zig/build]$ ./zig-cache/bin/zig env
{
"lib_dir": "/home/andy/Downloads/zig/build/zig-cache/lib/zig",
"std_dir": "/home/andy/Downloads/zig/build/zig-cache/lib/zig/std",
"id": "425a2d736364746e424a494b58497556",
"global_cache_dir": "/home/andy/.cache/zig",
"version": "0.6.0+a916f6394"
}
Most helpful comment
I like
zig infoand I further propose:zig targetsin outputting JSON formatlib/std)zig idcan be deprecated)zig versioncan be redundant)