Unicode.Bidi 0.3.18-preview.1

This is a prerelease version of Unicode.Bidi.
dotnet add package Unicode.Bidi --version 0.3.18-preview.1
                    
NuGet\Install-Package Unicode.Bidi -Version 0.3.18-preview.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Unicode.Bidi" Version="0.3.18-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Unicode.Bidi" Version="0.3.18-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="Unicode.Bidi" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Unicode.Bidi --version 0.3.18-preview.1
                    
#r "nuget: Unicode.Bidi, 0.3.18-preview.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Unicode.Bidi@0.3.18-preview.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Unicode.Bidi&version=0.3.18-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Unicode.Bidi&version=0.3.18-preview.1&prerelease
                    
Install as a Cake Tool

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_data mirrors src/char_data.
  • src/Unicode.Bidi/lib.cs mirrors the public BidiInfo construction and reordering APIs from src/lib.rs.
  • src/Unicode.Bidi/level.cs mirrors src/level.rs.
  • src/Unicode.Bidi/format_chars.cs mirrors src/format_chars.rs.
  • src/Unicode.Bidi/explicit.cs, prepare.cs, and implicit.cs mirror 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.