(JPL’s answer is correct, but I just thought I’d add a bit of detail here)
As the release notes mention, getEmittedDocs is the new method of accessing generated documentation. If that function is used to get a LazyPath, the build system will automatically trigger documentation generation to the returned directory.
Let’s say you have a std.Build.Step.Compile named lib, and you want to generate documentation for it and put it in the doc/ directory in the install prefix (zig-out/ by default). We’ll do this using an InstallDir step, which copies a directory of files to the installation prefix. Assuming your *std.Build is named b, your code would look like this:
The idea here is that we’re separating documentation generation from installation: the former is handled by getEmittedDocs and the latter by the InstallDir step. source_dir is telling the step what it is we want to copy (in this case the documentation directory); install_dir is the root path we’re going into (.prefix means the installation prefix); and install_subdir is the string subdir we want to go to (in this case "doc"). So this will generate the documentation for lib and copy it into to zig-out/doc/ by default.