diff --git a/.github/actions/build-pack/action.yml b/.github/actions/build-pack/action.yml index e8d5829..1ed7181 100644 --- a/.github/actions/build-pack/action.yml +++ b/.github/actions/build-pack/action.yml @@ -3,7 +3,7 @@ description: Builds and packs the Typst.Net Nuget package including native depen inputs: dotnet-version: description: .NET SDK version to install - default: 10.x + default: 11.x rust-version: description: Rust toolchain version to install default: 1.91.1 diff --git a/.github/workflows/pack.yml b/.github/workflows/pack.yml index 5aa4b89..77cc2fa 100644 --- a/.github/workflows/pack.yml +++ b/.github/workflows/pack.yml @@ -98,7 +98,7 @@ jobs: if: matrix.test_type == '' uses: actions/setup-dotnet@v5 with: - dotnet-version: 10.x + dotnet-version: 11.x - name: Run tests (Windows / Ubuntu) if: matrix.test_type == '' @@ -115,7 +115,7 @@ jobs: if: matrix.test_type == 'docker-alpine' shell: bash run: | - docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace mcr.microsoft.com/dotnet/sdk:10.0-alpine sh -c " + docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace mcr.microsoft.com/dotnet/sdk:11.0-alpine sh -c " dotnet nuget add source /workspace/artifacts --name local-artifacts dotnet nuget locals all --clear dotnet restore src/typstsharp.tests/typstsharp.tests.csproj -p:UsePackagedLibrary=true -p:PackageVersion=${{ needs.pack.outputs.package_version }} @@ -128,7 +128,7 @@ jobs: run: | docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace fedora:40 sh -c " dnf install -y curl tar icu - curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 10.0 --install-dir /usr/share/dotnet + curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 11.0 --install-dir /usr/share/dotnet ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet dotnet nuget add source /workspace/artifacts --name local-artifacts dotnet nuget locals all --clear diff --git a/README.md b/README.md index 3c40e2a..054b14b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # typstsharp -A .NET 10.0 wrapper around the Typst 0.15 rendering stack. The managed layer in `src/typstsharp` calls into the Rust `typst_core` crate via P/Invoke and exposes convenient helpers for C# consumers plus a simple CLI. +A .NET 11.0 wrapper around the Typst 0.15 rendering stack. The managed layer in `src/typstsharp` calls into the Rust `typst_core` crate via P/Invoke and exposes convenient helpers for C# consumers plus a simple CLI. For the latest changes, see our [Release Notes](RELEASENOTES.md). @@ -255,7 +255,7 @@ bound that, split a large document into several smaller ones and clear the cache ## Prerequisites -- [.NET SDK 10.0](https://dotnet.microsoft.com/) – required to build the managed projects. +- [.NET SDK 11.0](https://dotnet.microsoft.com/) – required to build the managed projects. - [Rust toolchain](https://www.rust-lang.org/tools/install) (with `cargo`) – **only required if you are building the project from source.** The NuGet package includes pre-compiled native binaries. ## Building diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 4d90b77..4b98c16 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -8,6 +8,7 @@ - Fixed `ua-1` (PDF/UA-1, the accessibility standard) being rejected by `pdfStandards`. The accepted names are now taken from `typst_pdf::PdfStandard` itself, so every standard Typst supports is accepted, including ones added by later Typst releases. The documented `v-` prefix on plain PDF versions still works, and applies only to them: `v-a-2b` is not a spelling of `a-2b`. ### Changed +- **Breaking:** Upgraded target frameworks to `net10.0` and `net11.0`, removing deprecated `net8` and `net9` targets. - `TypstCompiler.FromSource(...)` and the static one-shot helpers no longer copy the source onto the managed heap before handing it to the compiler. It is encoded straight into the native buffer, so a source over roughly 42,500 characters no longer puts an array on the large object heap for the duration of one call: a 200 KB source measured 200,024 bytes of managed heap before and none after. Native memory allocated while building a compiler is also released now when construction fails part way through, rather than leaking. - **Breaking (binary):** `SvgResult.GetEnumerator()` and `PngResult.GetEnumerator()` now return `PageEnumerator` rather than `IEnumerator`, so that `foreach` over a result no longer boxes the enumerator. Source-compatible: `foreach`, LINQ, `Count` and the indexer all keep compiling. Because a return type is part of the method signature and the compiler emits a direct call for pattern-based `foreach`, an assembly compiled against an earlier version throws `MissingMethodException` on that `foreach` until it is recompiled. - **Breaking:** an invalid combination of PDF standards now fails the compilation instead of silently producing an ordinary PDF. The validation error from `PdfStandards::new` was discarded and export fell back to the default, so a pipeline could believe it was writing PDF/A while it was not. Combinations such as two PDF/A levels, or a PDF/A level that contradicts the requested PDF version, now throw with the message and hints from Typst. Callers passing a contradictory combination today receive a document and will receive an exception after this change. diff --git a/src/typstsharp.cli/typstsharp.cli.csproj b/src/typstsharp.cli/typstsharp.cli.csproj index f9b17b2..4d546e7 100644 --- a/src/typstsharp.cli/typstsharp.cli.csproj +++ b/src/typstsharp.cli/typstsharp.cli.csproj @@ -2,7 +2,7 @@ Exe - net10.0 + net11.0 enable enable diff --git a/src/typstsharp.tests/typstsharp.tests.csproj b/src/typstsharp.tests/typstsharp.tests.csproj index d1d604f..5f0b751 100644 --- a/src/typstsharp.tests/typstsharp.tests.csproj +++ b/src/typstsharp.tests/typstsharp.tests.csproj @@ -4,7 +4,7 @@ enable enable Exe - net10.0 + net11.0 true true diff --git a/src/typstsharp/typstsharp.csproj b/src/typstsharp/typstsharp.csproj index 240906c..8fc4291 100644 --- a/src/typstsharp/typstsharp.csproj +++ b/src/typstsharp/typstsharp.csproj @@ -1,7 +1,7 @@ - net8;net9;net10.0 + net10.0;net11.0 enable enable true