feat(dotnet): add .NET bindings and NuGet packaging - #463
Open
lpperras wants to merge 4 commits into
Open
Conversation
Scope the .NET build artifact ignore patterns to the dotnet tree. The unanchored **/bin/ pattern also matched src/bin/, which holds the pdf2md, detect-pdf and dump_ops binary sources, so any newly added Rust binary would have been silently untracked. Guard the previous-version lookup in the NuGet workflow with git cat-file -e, mirroring publish-wasm.yml. Under bash -eo pipefail a missing dotnet/Directory.Build.props in HEAD~1 made git show exit 128 and aborted the step, which is exactly the commit that first introduces the file and triggers the workflow. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
All reported issues were addressed across 28 files
Shadow auto-approve: would not auto-approve because issues were found.
Tip: instead of fixing issues one by one fix them all with cubic
Re-trigger cubic
Harden NuGet publishing concurrency and shell interpolation, correct cross-platform native test paths, document page indexing, keep package artifacts ignored, and make embedded CMaps opt-in for default native builds. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
0 issues found across 7 files (changes from recent commits).
Shadow auto-approve: would require human review. Adds first-party .NET bindings and automated NuGet publishing; the PR defers package ownership/trusted-publishing setup to maintainers and opens a new consumer-facing API contract.
Re-trigger cubic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds first-party .NET bindings for
pdf-inspectorand packages them asFirecrawl.PdfInspector, with an API aligned to the existing WebAssembly wrapper.Native and managed bindings
cdylibwrapper with a stable C ABI and UTF-8 JSON contracts.netstandard2.0C# library using P/Invoke, with strongly typed options, results, exceptions, and ABI compatibility checks.NuGet packaging
Firecrawl.PdfInspectorpackage with Source Link, symbols, and package documentation.win-x64,linux-x64,linux-arm64, andosx-arm64in one package under the standard RID runtime layout.CI and publishing
main; manual dispatches never authenticate or publish.Documentation
Validation
Required before merge: NuGet trusted-publishing policy
A NuGet.org trusted-publishing policy must be created before this PR is accepted, so the repository can publish
Firecrawl.PdfInspectorthrough.github/workflows/publish-nuget.ymlusing thenugetGitHub environment. The corresponding NuGet.org profile name must also be stored as the repository secretNUGET_USER.There are two ownership options:
Please let me know which ownership path you prefer before merging.
Summary by cubic
Adds first-party .NET bindings for
pdf-inspectorand packages them as theFirecrawl.PdfInspectorNuGet package, with an API aligned to the existing WebAssembly wrapper. Previously there were no .NET bindings; .NET consumers can now process, classify, extract, and OCR PDFs locally without the Rust toolchain.New Features
cdylibwrapper exposes a stable C ABI with UTF-8 JSON contracts, contains Rust panics, and defines explicit result-buffer ownership and freeing.netstandard2.0library uses P/Invoke with strongly typed options, results, exceptions, and an ABI version check.win-x64,linux-x64,linux-arm64, andosx-arm64ship in one package under the RID runtime layout.embedded-cmapsfeature used by the .NET and WASM crates; default native Rust builds keep file-based CMaps.mainvia trusted publishing while manual runs only produce artifacts.Migration
firecrawl/pdf-inspectorand theNUGET_USERsecret.Written for commit fa9b2fd. Summary will update on new commits.