Runtime engine to power RuleX APIs
Project description
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)
runner = rulex_runtime.initialize()
# Load a pre-compiled .wasmu artifact
with open("rule.wasmu", "rb") as f:
wasmu_bytes = f.read()
# Compile a .wasm module to a portable .wasmu artifact
with open("rule.wasm", "rb") as f:
wasm_bytes = f.read()
version, wasmu_bytes = rulex_runtime.compile_wasm(wasm_bytes)
# Get a calculator for a specific interface and executor version
# Interface version is currently fixed to 1
calculator = runner.get_calculator((1, version), wasmu_bytes)
# 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)
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
Supported Versions
rulex_runtime.SUPPORTED_VERSIONS is a frozenset of (interface version, executor version) tuples indicating which executor versions are available. The latest is always used for new compilations.
License
Proprietary — Copyright © CoverStack Technologies. All rights reserved.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rulex_runtime-0.1.0-cp314-cp314t-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: rulex_runtime-0.1.0-cp314-cp314t-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 43.4 MB
- Tags: CPython 3.14t, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
746cbdf40d6e84fdcccb4fdb3f0e71902c07e56b64847db6fc54426e21727946
|
|
| MD5 |
11e99d72daaf096abce4d8e3d5b6ef94
|
|
| BLAKE2b-256 |
631a6db7e718cf29e6019a92977755c4145d4c238989f6eadd00c03eafd74c78
|
File details
Details for the file rulex_runtime-0.1.0-cp314-cp314-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: rulex_runtime-0.1.0-cp314-cp314-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 43.4 MB
- Tags: CPython 3.14, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3db4df097ca6287145b2a5977b515dc999381f79772983cec95aeaf4d6eb7603
|
|
| MD5 |
8822ce29b0cf4c82a9ae0c4460c292f7
|
|
| BLAKE2b-256 |
78699ea192d2af90cb24deb2cf60071847fd562804b73389423f0636329f4187
|
File details
Details for the file rulex_runtime-0.1.0-cp313-cp313t-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: rulex_runtime-0.1.0-cp313-cp313t-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 43.4 MB
- Tags: CPython 3.13t, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f95039145af88727155159a6b58e09488289f6ce3f472dddfb694ee51a2bfef
|
|
| MD5 |
4a9820065ec9bc17629273a552d54540
|
|
| BLAKE2b-256 |
9b7d8fc5f77ba42c4c64e8731e03dc72a27837aa67334a589a8dffee2321cf1c
|
File details
Details for the file rulex_runtime-0.1.0-cp313-cp313-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: rulex_runtime-0.1.0-cp313-cp313-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 43.4 MB
- Tags: CPython 3.13, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78f4885b63ce5dfb12f7d3233258016b5cc2a71e8706d8341e489e386bb124ec
|
|
| MD5 |
3bc8c0146512e3db135fb601d94e6988
|
|
| BLAKE2b-256 |
9565b8ea4d061c9d51a9a706b536b934eea0ba22b6a2ea180ca0b261a54e01e6
|