There is a newer version available. For the latest stable version, please use dengjen-tashkeel 3.x!

Installation

Rust

cargo add dengjen-tashkeel

The default features (ort-static, rayon) statically link a bundled ONNX Runtime, so this works with no extra setup. The build downloads prebuilt ONNX Runtime binaries, so it needs network access and a supported target.

To load a system ONNX Runtime instead, for example on an unsupported target or to use a GPU build, disable the defaults and enable ort-dylib:

dengjen-tashkeel = { version = "*", default-features = false, features = ["ort-dylib"] }

Then either set ORT_DYLIB_PATH to the shared library, or call dengjen_tashkeel::init_ort_dylib(path) before create_inference_engine. The CLI exposes the same feature: cargo install dengjen-tashkeel-cli --no-default-features --features ort-dylib. See Troubleshooting for common failures.

Python

pip install dengjen-tashkeel-py

Published to PyPI as dengjen-tashkeel-py by the publish-python.yml CI workflow, which release.yml runs after tagging each release (merging the Prepare release PR). Wheels are built for x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu (manylinux 2_28), aarch64-apple-darwin, and x86_64-pc-windows-msvc, as one abi3 wheel per platform for CPython 3.11 and later; on other platforms, build the wheel yourself (see Building). The wheel depends on onnxruntime (installed automatically by pip); don’t have onnxruntime-gpu installed alongside it — they share the same import name.

C

Download the prebuilt dengjen-tashkeel-capi-<target> archive for your platform from GitHub Releases. Each archive bundles the built shared library (.so/.dylib/.dll) together with dengjen_tashkeel.h — link against the library and include the header, no need to build from source.

The library and header are also available through a self-hosted vcpkg custom registry — this repository itself, referenced directly by git, no separate server needed. Add it to your project’s vcpkg-configuration.json:

{
  "default-registry": {
    "kind": "builtin",
    "baseline": "<current vcpkg builtin-registry baseline>"
  },
  "registries": [
    {
      "kind": "git",
      "repository": "https://github.com/ZirekHQ/dengjen-tashkeel",
      "baseline": "<commit-sha of the dengjen-tashkeel commit to pin>",
      "packages": ["dengjen-tashkeel-capi"]
    }
  ]
}

then add dengjen-tashkeel-capi to your vcpkg.json dependencies and run vcpkg install.

ConanCenter requires recipes to build from source, which this project’s C API can’t do without a Rust toolchain in Conan’s build environment, so this isn’t published there. Instead, clone this repository and export the recipe into your local Conan cache:

conan create packaging/conan --version=2.1.0

then add dengjen-tashkeel-capi/2.1.0 to your conanfile.txt/conanfile.py requires. See packaging/README.md in the repository for how both are maintained.

Java

Requires JDK 22 or later (the jar is built with a JDK 25 toolchain but targets Java 22, the first release in which the Foreign Function & Memory API is final). Native jars exist only for linux-x86_64, windows-x64, and macos-aarch64; on other platforms, such as Linux aarch64 or macOS x86_64, build the C ABI library yourself and point -Ddengjen.tashkeel.native.library.path at it.

implementation("io.github.zirekhq:dengjen-tashkeel:2.1.0")
runtimeOnly("io.github.zirekhq:dengjen-tashkeel:2.1.0:linux-x86_64")

Published to Maven Central by the publish-java.yml CI workflow, which release.yml runs after tagging each release (merging the Prepare release PR). The binding uses the JDK Foreign Function & Memory API (java.lang.foreign), not JNA, to load the native dengjen_tashkeel_capi shared library. The native library ships as per-platform classifier jars — linux-x86_64, windows-x64, and macos-aarch64 — so add a runtimeOnly dependency on the one matching your platform alongside the main dependency; it’s picked up automatically at runtime. To use a library you built or placed yourself instead, set -Ddengjen.tashkeel.native.library.path=/path/to/library (a file path, not a directory — java.library.path is not consulted). Either way, add --enable-native-access=ALL-UNNAMED to your own JVM invocation to avoid a native-access warning.

CLI

Either build from source (see Building) or:

cargo install dengjen-tashkeel-cli