Unicode.Bidi
0.3.18-preview.1
dotnet add package Unicode.Bidi --version 0.3.18-preview.1
NuGet\Install-Package Unicode.Bidi -Version 0.3.18-preview.1
<PackageReference Include="Unicode.Bidi" Version="0.3.18-preview.1" />
<PackageVersion Include="Unicode.Bidi" Version="0.3.18-preview.1" />
<PackageReference Include="Unicode.Bidi" />
paket add Unicode.Bidi --version 0.3.18-preview.1
#r "nuget: Unicode.Bidi, 0.3.18-preview.1"
#:package Unicode.Bidi@0.3.18-preview.1
#addin nuget:?package=Unicode.Bidi&version=0.3.18-preview.1&prerelease
#tool nuget:?package=Unicode.Bidi&version=0.3.18-preview.1&prerelease
Unicode.Bidi
.NET port of Rust unicode-bidi, tracking crate version 0.3.18 and Unicode data 16.0.0.
The port intentionally keeps source organization close to the Rust crate so individual files can be compared as the implementation grows:
src/Unicode.Bidi/char_datamirrorssrc/char_data.src/Unicode.Bidi/lib.csmirrors the publicBidiInfoconstruction and reordering APIs fromsrc/lib.rs.src/Unicode.Bidi/level.csmirrorssrc/level.rs.src/Unicode.Bidi/format_chars.csmirrorssrc/format_chars.rs.src/Unicode.Bidi/explicit.cs,prepare.cs, andimplicit.csmirror the matching Rust modules.
Indexing Policy
.NET strings are UTF-16, so public text ranges and per-code-unit arrays in this port use UTF-16 code-unit indices. The parity harness compares these results against Rust's unicode_bidi::utf16 module.
Usage
Install the package as Unicode.Bidi and import the root namespace:
using Unicode.Bidi;
BidiInfo info = BidiInfo.Create("abc אבג", Level.Ltr());
ParagraphInfo paragraph = info.Paragraphs[0];
string visual = info.ReorderLine(paragraph, paragraph.Range);
BidiClass alefClass = CharData.BidiClass('\u05D0');
Level explicitLevel = Level.CreateExplicit(1);
Rust-compatible factory names such as BidiInfo.New and Level.New are kept for source traceability. .NET-style Create aliases are available on the main entry points.
Local Validation
dotnet restore UnicodeBidiNet.slnx
dotnet build UnicodeBidiNet.slnx --configuration Release --no-restore
dotnet test UnicodeBidiNet.slnx --configuration Release --no-build --nologo
The parity harness compares selected .NET outputs with the original Rust crate:
./tools/fetch-upstream.sh
python3 tools/parity/run_bidi_parity.py --out-dir artifacts/bidi-parity
The parity run requires cargo because the Rust probe is built against unicode-bidi = "=0.3.18".
If Rust is not installed globally, use the repo-local bootstrap:
./tools/bootstrap-local-rust.sh
python3 tools/parity/run_bidi_parity.py --out-dir artifacts/bidi-parity
Unicode Conformance
The larger Unicode 16.0.0 conformance files are downloaded on demand into artifacts/:
python3 tools/conformance/fetch_unicode_bidi_tests.py
python3 tools/conformance/run_unicode_bidi_conformance.py \
--max-cases 1000 \
--out-dir artifacts/bidi-conformance \
--fail-on-regression
Use --full for a full local/provisioned run. GitHub Actions also provides a manual Unicode Conformance workflow and a weekly full-corpus ratchet.
Packaging
Preview packages can be produced locally with:
dotnet pack src/Unicode.Bidi/Unicode.Bidi.csproj --configuration Release --output artifacts/packages
Publishing to nuget.org is done through the manual Publish to NuGet GitHub Actions workflow. See docs/publishing.md for the required NuGet Trusted Publishing policy and publish inputs.
See docs/api-compatibility.md and docs/conformance.md for the current parity notes and conformance workflow.
| 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
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Unicode.Bidi:
| Package | Downloads |
|---|---|
|
PdfBox.Net.SkiaSharp
Complete cross-platform SkiaSharp rendering and glyph layout backend for PdfBox.Net. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.3.18-preview.1 | 764 | 7/7/2026 |
Tracks unicode-bidi 0.3.18 with Unicode data 16.0.0.