diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 1d5ea8d..d2fe453 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -24,12 +24,13 @@ jobs:
include:
- name: windows-x86_64
target: x86_64-windows-gnu
+ archive: zip
- name: linux-x86_64
target: x86_64-linux-gnu.2.28
+ archive: tar.gz
- name: macos-aarch64
target: aarch64-macos.13.0
- - name: macos-x86_64
- target: x86_64-macos.13.0
+ archive: zip
steps:
- name: Check out source
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
@@ -49,24 +50,29 @@ jobs:
-Dcpu=baseline
--prefix zig-out/${{ matrix.name }}
- # A tar archive preserves executable permissions inside the uploaded ZIP.
- - name: Package build
+ - name: Package Linux build
+ if: matrix.archive == 'tar.gz'
run: >-
tar -czf zdxc-${{ matrix.name }}.tar.gz
-C zig-out/${{ matrix.name }} bin lib include
+ - name: Package Windows and macOS builds
+ if: matrix.archive == 'zip'
+ working-directory: zig-out/${{ matrix.name }}
+ run: zip -r ../../zdxc-${{ matrix.name }}.zip bin lib include
+
- name: Upload build
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: zdxc-${{ matrix.name }}
- path: zdxc-${{ matrix.name }}.tar.gz
+ path: zdxc-${{ matrix.name }}.${{ matrix.archive }}
if-no-files-found: error
retention-days: 14
release:
name: Publish release binaries
needs: build
- if: startsWith(github.ref, 'refs/tags/v')
+ if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-rc')
runs-on: ubuntu-24.04
timeout-minutes: 10
permissions:
@@ -86,8 +92,8 @@ jobs:
TAG: ${{ github.ref_name }}
run: |
if gh release view "$TAG" >/dev/null 2>&1; then
- gh release upload "$TAG" artifacts/*.tar.gz --clobber
+ gh release upload "$TAG" artifacts/*.tar.gz artifacts/*.zip --clobber
else
- gh release create "$TAG" artifacts/*.tar.gz \
+ gh release create "$TAG" artifacts/*.tar.gz artifacts/*.zip \
--verify-tag --title "zdxc $TAG" --generate-notes
fi
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..d40afd8
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,26 @@
+MIT License
+
+Copyright (c) 2026 Peter Li
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+---
+
+Files under vendor/ are third-party and remain under their own licenses; see
+vendor/PROVENANCE.md and vendor/hlsl-headers/LICENSE.txt.
diff --git a/README.md b/README.md
index c4013b5..ec97851 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
---
@@ -30,7 +29,7 @@ signs its own DXIL, so there is no separate `dxil.dll` to ship.
| Fast iteration | Small footprint | Easy to embed |
| :--- | :--- | :--- |
-| About **14× faster compilation** in the Hyperion benchmark below. | **4.2 MB** Windows drop-in, compared with **19.3 MB** for DXC plus its DXIL library. | A **static library** by default, with a C API and a native Zig module. |
+| About **14× faster compilation** in the Hyperion benchmark. | **4.2 MB** Windows drop-in, compared with **19.3 MB** for DXC plus its DXIL library. | A **static library** by default, with a C API and a native Zig module. |
## Quick start
@@ -55,76 +54,32 @@ zig-out/bin/zdxc -spirv -T ps_6_0 -E main shader.hlsl -Fo shader.spv
The build installs the compiler in `zig-out/bin/`, the library in
`zig-out/lib/`, and the public header in `zig-out/include/`.
-### Automated builds
+## Documentation and downloads
-Pushes to `main` run the [cross-platform build workflow](.github/workflows/build.yml)
-with Zig 0.17.0. It cross-compiles ReleaseFast builds on Linux for Windows x86-64,
-Linux x86-64 (glibc 2.28 or newer), and macOS 13 or newer on both Apple Silicon
-and Intel. Each artifact contains the CLI, static C library, header, and DXC
-drop-in. These are build checks; they do not run the binaries on each target OS.
+Read the [manual on zdxc.org](https://zdxc.org/manual.html) for command-line
+options, batch compilation, the C API, DXC drop-in support, and Zig integration.
+The [manual Markdown sources](docs/manual/) live in this repository.
-Download the `.tar.gz` bundles from a successful run's **Artifacts** section
-on [GitHub Actions](https://github.com/peterino2/zdxc/actions). Artifacts are
-retained for 14 days. The workflow can also be started manually.
-
-## Use it your way
-
-### Replace DXC in an existing integration
+For an existing DXC integration, build the drop-in executable and shared library:
```sh
zig build dropin -Doptimize=ReleaseFast
```
-This builds `dxc` and the platform's `dxcompiler` shared library. Place them
-where your application looks for DXC. The library exports `DxcCreateInstance`
-and `DxcCreateInstance2`, including support for `IDxcCompiler3::Compile`.
+Download Windows, Linux, and macOS bundles from a successful run's **Artifacts**
+section on [GitHub Actions](https://github.com/peterino2/zdxc/actions).
+Each bundle includes the CLI, static C library, header, and DXC drop-in.
-See the [drop-in guide](docs/dropin.md) for supported interfaces and behavior.
-
-### Link the compiler into your application
-
-The default build produces a static library with a [small C API](docs/c-api.md).
-Pass source and options in; get compiled objects and diagnostics back in
-memory. Supply an include callback to integrate with your own filesystem.
-
-Prefer a shared library? Build with `-Dlinkage=dynamic`. Zig projects can
-import the `zdxc` module and supply an allocator directly to the compilation
-API.
-
-### Compile a whole batch
-
-```sh
-zig-out/bin/zdxc --job=shaders.json
-```
-
-Compile many shaders in one process, with parallel workers and output files
-specified per job. See the [batch guide](docs/batch.md) for the JSON format
-and threading options.
-
-## Performance in an engine
-
-In a Windows DXIL benchmark, Hyperion cooked Glide's 2,688 shader assets
-using either DXC or zdxc through the engine's existing compiler interface.
-The machine used a Ryzen 9 7900 with 24 threads; the DXC version was 1.8.2505.
-
-| Measurement | DXC | zdxc | Speedup |
-| :--- | ---: | ---: | ---: |
-| Complete shader cook, wall time | 58.9 s | 23.2 s | **2.5×** |
-| Compile step, summed across workers | 241.3 s | 17.4 s | **13.9×** |
-| Median compile call | 12.6 ms | 1.0 ms | **12.7×**¹ |
-
-¹ Ratios use the unrounded measurements.
-
-These are measurements of one engine workload, not a universal speedup.
-The complete cook includes preprocessing and asset processing, so its
-improvement is smaller than the compile step's. Both builds rendered the
-same tested scene; compilation throughput is separate from GPU performance.
+See the [Hyperion case study](https://zdxc.org/case-studies.html) for benchmark
+measurements and methodology. In that Windows DXIL workload, zdxc's compile
+step was **13.9× faster** and the complete shader cook was **2.5× faster**.
## Status
zdxc is **alpha software**, focused on HLSL 2021 (`-HV 2021`). DXC compatibility
is still being developed; not every DXC interface or feature is implemented.
-The [drop-in guide](docs/dropin.md) documents the current interface coverage.
+The [drop-in manual](https://zdxc.org/manual.html#section-dxc-drop-in) documents
+the current interface coverage.
To run the unit tests:
diff --git a/docs/assets/logo.svg b/docs/assets/logo.svg
index e5108e1..402ed63 100644
--- a/docs/assets/logo.svg
+++ b/docs/assets/logo.svg
@@ -1,10 +1,5 @@
-