FlowDoc.Native
1.1.0
See the version list below for details.
dotnet add package FlowDoc.Native --version 1.1.0
NuGet\Install-Package FlowDoc.Native -Version 1.1.0
<PackageReference Include="FlowDoc.Native" Version="1.1.0" />
<PackageVersion Include="FlowDoc.Native" Version="1.1.0" />
<PackageReference Include="FlowDoc.Native" />
paket add FlowDoc.Native --version 1.1.0
#r "nuget: FlowDoc.Native, 1.1.0"
#:package FlowDoc.Native@1.1.0
#addin nuget:?package=FlowDoc.Native&version=1.1.0
#tool nuget:?package=FlowDoc.Native&version=1.1.0
FlowDoc.Native
C# binding (via P/Invoke) for FlowDoc — a fast serialization format: indent-delimited key: value records, parsed by a shared Rust core.
using FlowdocNative;
var records = FlowdocNative.ParseFlow("""
Record
id: 1
name: Test
""");
// [{ "id": "1", "name": "Test" }]
Requires the platform-matching native library (libflowdoc_core.so/.dylib/flowdoc_core.dll) alongside the assembly — see the main repository for build instructions.
.flowb (binary)
SaveFlowb/LoadFlowb read and write .flowb, the MessagePack-encoded binary
counterpart to .flow text — same List<Dictionary<string, string>> shape as
ParseFlow/ParseFlowBinary, just encoded instead of key: value text. This
path is pure C# (the MessagePack
NuGet package) with no P/Invoke and no dependency on libflowdoc_core — it
never touches the native library or the FFI memory-safety rules that apply to
ParseFlow/ParseFlowBinary above.
using FlowdocNative;
var records = FlowdocNative.ParseFlow("""
Record
id: 1
name: Test
""");
FlowdocNative.SaveFlowb("data.flowb", records);
var loaded = FlowdocNative.LoadFlowb("data.flowb");
// loaded == records
.flowc (compact)
ParseFlowCompact/WriteFlowCompact read and write .flowc ("compact
flow") — a denser text sibling of .flow: no Record header, no
indentation, key:value (no space), blank line separates records. Same
List<Dictionary<string, string>> shape as ParseFlow, and the same
P/Invoke memory-safety rules apply (flowdoc_parse_compact/
flowdoc_write_compact are freed via flowdoc_free_string, same as
flowdoc_parse). See docs/FORMAT_FLOWC.md in the main repository for
the grammar.
using FlowdocNative;
var records = FlowdocNative.ParseFlowCompact("id:1\nname:Test\n\nid:2\nname:Test2");
// [{ "id": "1", "name": "Test" }, { "id": "2", "name": "Test2" }]
string flowc = FlowdocNative.WriteFlowCompact(records);
// "id:1\nname:Test\n\nid:2\nname:Test2"
Licensing (soft gate)
ParseFlow/ParseFlowBinary/ParseFlowCompact/etc. work identically
whether or not a license key is configured — there is no Pro-exclusive
capability gated by this yet. If FLOWDOC_LICENSE_KEY is set, this package
validates it once per process, in the background (fired from License's
static constructor, the first time anything touches that type), against
FLOWDOC_LICENSE_SERVER + /api/licenses/validate (no default server —
validation is skipped entirely if this isn't set too), and logs a warning
on an invalid key or an unreachable server. Query the result yourself
with:
using FlowdocNative;
LicenseStatus status = await License.GetStatusAsync();
// LicenseStatus { Checked = true, Valid = true | false | null, Error = string? }
Valid is null when there was nothing to check (no key configured) or
nothing could be checked (no server configured, or unreachable) — see
License.cs for the full behavior.
In production, set FLOWDOC_LICENSE_SERVER=https://license-admin.sendwavehub.tech/api
(the trailing /api is required — see RELEASING.md's "Production
license server" section for why). There is no default; validation is
skipped entirely without it.
Activation
License.ActivateLicenseAsync(activatedBy, activationIp: null, metadata: null)
is a separate, explicit call — unlike GetStatusAsync(), it never runs
automatically, since it's a mutating call (it flips the license to
"Activated" server-side, unlike /validate's read-only check). Call it
once, e.g. on first run/install:
using FlowdocNative;
ActivateLicenseResult result = await License.ActivateLicenseAsync("install-script");
// ActivateLicenseResult { Success = true, Error = null, Message = ..., Tier = ...,
// Seats = ..., ExpiresAt = ..., CustomerId = ..., SignedLicenseArtifact = ... }
// or, on failure: { Success = false, Error = string, ...other fields null }
See the main repository for the format specification, benchmarks, and the other six language bindings (Rust, Go, Python, Node.js, PHP, C++).
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- MessagePack (>= 3.1.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.