Build without semantic analysis

hey i am thinking about what if we have an compiler flag to build without simantic analysis. directly from src to bin to
boost compilation speed.

Usecases:

  1. when we fetch any package we are pretty much sure the package is simanticly correct. so we can escape simantic analysis and build directly.
  2. when we are writing code maybe the lsp or zig watch type something will checking for semantics analysis. as a result we can build directly the src to bin.

maybe in other cases it is going to be helpful.
feel free to correct me if I am wrong.

Note what semantic analysis also includes comptime code evaluations so you cant just skip it.

1 Like