WebGPU needs cross-links between multiple documents in the same repository (the WebGPU spec, the shading language spec WGSL, and I'd also like to be able to write our explainer in bikeshed to use cross-links to those two specs).
These specs aren't published so they're not in the global database yet - but it would also be nice if we could e.g. ref a term from WebGPU in the same commit where it's defined in WGSL.
One way to solve this would be with a build step that generates anchors.bsdata from a spec. Then for a full build we could do something like:
- build
wgsl/index.bs, ignoring link errors, and generating wgsl/index.anchors.bsdata
cp wgsl/index.anchors.bsdata spec/anchors.bsdata
- build
spec/index.bs, generating spec/index.anchors.bsdata
cp spec/index.anchors.bsdata wgsl/anchors.bsdata
- rebuild
wgsl/index.bs without ignoring link errors
cat spec/index.anchors.bsdata wgsl/index.anchors.bsdata > explainer/anchors.bsdata
- build
explainer/index.bs
WebGPU needs cross-links between multiple documents in the same repository (the WebGPU spec, the shading language spec WGSL, and I'd also like to be able to write our explainer in bikeshed to use cross-links to those two specs).
These specs aren't published so they're not in the global database yet - but it would also be nice if we could e.g. ref a term from WebGPU in the same commit where it's defined in WGSL.
One way to solve this would be with a build step that generates
anchors.bsdatafrom a spec. Then for a full build we could do something like:wgsl/index.bs, ignoring link errors, and generatingwgsl/index.anchors.bsdatacp wgsl/index.anchors.bsdata spec/anchors.bsdataspec/index.bs, generatingspec/index.anchors.bsdatacp spec/index.anchors.bsdata wgsl/anchors.bsdatawgsl/index.bswithout ignoring link errorscat spec/index.anchors.bsdata wgsl/index.anchors.bsdata > explainer/anchors.bsdataexplainer/index.bs