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.yaml CI workflow, which
release.yaml 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=3.0.2
then add dengjen-tashkeel-capi/3.0.2 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:3.0.2")
Published to Maven Central by the publish-java.yaml CI workflow, which release.yaml 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 libraries (linux-x86_64,
windows-x64, macos-aarch64) ship in the dengjen-tashkeel-natives artifact, which the main
dependency pulls in; it is published only when the native code changes, so its version differs from
the binding’s. 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).
The native library does not embed onnxruntime (nor the model, which comes from the dengjen-tashkeel-model artifact, a dependency of the main one): install onnxruntime 1.28 or newer (the shared library
of the official release, or the copy inside the onnxruntime pip package) and point to it with
-Ddengjen.tashkeel.onnxruntime.path=/path/to/library or the ORT_DYLIB_PATH environment variable;
otherwise the platform loader search path is used.
Also 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