Add .NET bindings for anydoc (native + WebAssembly) - #56
Open
junian wants to merge 4 commits into
Open
Conversation
…els for document conversion
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.
This PR adds official .NET bindings for anydoc, the Rust library that converts documents (Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, and PDF) to GitHub-Flavored Markdown, so C# apps can use it from both classic desktop, ASP.NET backend, and browser environments (Blazor WebAssembly).
What's included
dotnet/Firecrawl.Anydoc— native binding (non-browser)runtimes/{rid}/native/layout, with a customDllImportResolverso it loads with zero extra setup.DetectFormat,DetectFormatByExtension,ToMarkdown,ToMarkdownBytes,ToDocument, plusAsyncvariants that offload to the thread pool.dotnet/Firecrawl.Anydoc.Wasm— browser binding (Blazor WebAssembly)DetectFormatAsync,ToMarkdownBytesAsync, …) matching the native surface, with sync-named members throwingPlatformNotSupportedExceptionfor parity._content/Firecrawl.Anydoc.Wasm/) so the glue + wasm binary flow to Blazor WASM hosts automatically.dotnet/Firecrawl.Anydoc.Shared— shared model & typesDocument,Block,Inline,Table,Asset, …) and common types (Format,ConvertErrorKind,AnydocException) live in one place and are compiled by both bindings, so both packages expose the identicalFirecrawl.AnydocAPI.Tests & demos
Firecrawl.Anydoc.Tests— native binding smoke tests against the shared fixture corpus.Firecrawl.Anydoc.Wasm.Tests— wasm binding tests.AnydocBlazorWasmDemo— in-browser conversion demo (Blazor WebAssmebly with Fluent UI).AnydocAvaloniaDemo— desktop conversion demo (Avalonia UI).Both bindings are packed as NuGet packages (
Firecrawl.AnydocandFirecrawl.Anydoc.Wasm).Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.