rulex-runtime
Runtime engine powering the RuleX APIs. Executes pre-compiled WASM rule modules with high performance via LLVM-backed AOT compilation.
Features
- Execute compiled rule modules (
.wasmu) against spreadsheet-like cell inputs - AOT-compiled WASM via LLVM for maximum execution performance
- Multi-version executor support — artifacts are version-locked and multiple executor versions are bundled
- Thread-safe, concurrent execution
- Supports free-threaded Python (3.13t, 3.14t)
Requirements
- Linux x86_64 or aarch64
- Python 3.13+
Usage
import rulex_runtime
# Initialize the runner (optionally specify max concurrency and max memory for calculator cache)
runner = rulex_runtime.initialize()
# Load a pre-compiled .wasmu artifact
wasmu_path = pathlib.Path("rule.wasmu")
# Compile a .wasm module to a portable .wasmu artifact
wasm_bytes = pathlib.Path("rule.wasm").read_bytes()
wasmu_path.write_bytes(rulex_runtime.compile_wasm(wasm_bytes))
# Get the corresponding Calculator instance
calculator = runner.get_calculator(wasmu_path)
# Run a calculation
cell_ref = rulex_runtime.CellRef("Sheet1", "A1")
result = calculator.run(
inputs={cell_ref: 42},
outputs={cell_ref},
)
print(result.output)
print(result.cacheable)
# Validate inputs without specifying outputs
cacheable = calculator.validate(inputs={cell_ref: 42})
print(cacheable)
Concurrency
Calculator is thread-safe. calculator.run() is fully isolated and does not mutate any shared state, so it can be called concurrently from multiple threads with different inputs and outputs.
The concurrency parameter to initialize() controls the size of the executor thread pool. It should not exceed the total number of physical CPU cores on the machine. When running the runtime across multiple processes, ensure that the sum across all processes respects this constraint:
process_count × concurrency ≤ physical_cpu_count
The calculator_cache parameter to initialize() controls the LRU cache size of calculators. Calculator memory usage is estimated on a best-effort basis. So, it is advised to keep some margin based on the total memory available on the machine.
Supported Interfaces
rulex_runtime.SUPPORTED_INTERFACES is a frozenset of int indicating which interface versions are available.
Compilation
bytes returned by compile_wasm() are only compatible with the executor version (i.e. EXECUTOR_VERSION) used to compile it. Caller is advised to keep track of the EXECUTOR_VERSION for the returned binary.
If the content of path passed to get_calculator() does not correspond with the current executor version (EXECUTOR_VERSION), then InternalError will be raised.
License
Proprietary — Copyright © CoverStack Technologies. All rights reserved.
Metadata
Release files for rulex-runtime 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 199.2 MB
Release files / rulex_runtime-1.0.1-cp314-cp314t-manylinux_2_28_x86_64.whl
| Download URL | rulex_runtime-1.0.1-cp314-cp314t-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 33.6 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
c85b500eccf0eec4a2349f28d1acca492219116a2a49521edd18a726085510c5
|
|
BLAKE2b-256 checksum How to use checksums |
5092a6a6b96b514276440821100a77c3f72fd57fe82f17eaabd3ad20d73acae4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / rulex_runtime-1.0.1-cp314-cp314t-manylinux_2_28_aarch64.whl
| Download URL | rulex_runtime-1.0.1-cp314-cp314t-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 32.8 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
63fa593d73bb35592512750a9942e5cf8d3543817f84894e38c1ae3562702fc0
|
|
BLAKE2b-256 checksum How to use checksums |
9e1f3e5204610472e58cef32e637770b13ac0b66627432b3f3c775599f69fec7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / rulex_runtime-1.0.1-cp314-cp314-manylinux_2_28_x86_64.whl
| Download URL | rulex_runtime-1.0.1-cp314-cp314-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 33.6 MB |
| Tags | CPython 3.14 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
9ca95a84095cca91ced6f80c701124e77a514fea0bf489b298fa17c9a56ba487
|
|
BLAKE2b-256 checksum How to use checksums |
bc503efcdd9786feb5e1cdc5bc07fe6e9e8897665aa5c8028003f0c20892d4e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / rulex_runtime-1.0.1-cp314-cp314-manylinux_2_28_aarch64.whl
| Download URL | rulex_runtime-1.0.1-cp314-cp314-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 32.8 MB |
| Tags | CPython 3.14 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
a0cf0a09696240014b5f4ba9639e4b593841aa62c9479227cbd4032ede708ae1
|
|
BLAKE2b-256 checksum How to use checksums |
65d30fac77fba02ce7f6e12d0c46bd329e30aed86ae683d4692d42a1576eef4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / rulex_runtime-1.0.1-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | rulex_runtime-1.0.1-cp313-cp313-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 33.6 MB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
90c14501623c1059cd1db367362ba8d0646b562134cc6277280d9ca777e42b76
|
|
BLAKE2b-256 checksum How to use checksums |
0a0fd412b291bce1f8a22df25b773f19a1272bea2284a569cee5d1455ce96a80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / rulex_runtime-1.0.1-cp313-cp313-manylinux_2_28_aarch64.whl
| Download URL | rulex_runtime-1.0.1-cp313-cp313-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 32.8 MB |
| Tags | CPython 3.13 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
3acaf6afdfd032344d2d5c1188a0e7805752a6489b087febd44083119144bdb3
|
|
BLAKE2b-256 checksum How to use checksums |
cb2d0881ee988933264a35d9f8414c17d7f5123bbe74a64213bca7477cc475b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Security for rulex-runtime 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.