Skip to main content

mftik

Phase 1 is an STS Python SDK, written in Rust and exposed with PyO3, that is compatible with mftiko. Acceptance is mftiko-conformance passing every check in mftiko PROTOCOL §9.

The Python package name is mftik (import mftik). Version 0.14.0 is a Rust rewrite and is incompatible with the previous API. Older releases already on PyPI, including 0.12.x, stay there. The tree before this rewrite is the legacy-final tag.

Decisions for this repo are in docs/DECISIONS.md.

Crates

Crate Path Role
mftik-proto crates/mftik-proto Prost types for the pinned mftiko protos. Generated code stays out of git.
mftik-core crates/mftik-core Pure Rust algorithms. No IO.
mftik-py crates/mftik-py PyO3 bindings. The Python package is mftik (python/mftik); the native module is mftik._mftik.
mftik-rt crates/mftik-rt Session worker runtime: fd 3, C4, the dispatcher, NATS, and timers. Strategy and Context.
mftik-testkit crates/mftik-testkit Dev-only nats-server and fake-shim harness (publish = false).
mftik-conform examples/conform The Rust standard conformance strategy (PROTOCOL §9.8), the conform binary.

The Python API will be snake_case and one-to-one with the Go SDK.

Proto

contract/proto/mftiko is a copy of BullionBear/mftiko contract/proto/mftiko at e7b3543e2269c4ae8c10631edd448bdb86c52e2c. scripts/sync-proto reproduces that copy and writes the source commit to contract/proto/SOURCE.

scripts/sync-proto          # copy again and rewrite SOURCE
scripts/sync-proto --check  # fail if the tree or SOURCE drifts from the pin
scripts/sync-proto-negative # require --check to fail on a drifted temporary copy

Build

rust-toolchain.toml pins the current stable toolchain (1.99.1). Crates use edition 2024.

cargo build --workspace

mftik-proto's build.rs runs prost-build with protoc from protoc-bin-vendored. Generated Rust is written under target/ and is not committed.

Python uses uv and maturin. Lint with ruff.

uv sync
uv run maturin develop
uv run ruff check python tests/python crates/mftik-py/tests/pystrategies
uv run ruff format --check python tests/python crates/mftik-py/tests/pystrategies

mftik requires Python 3.11 or newer (abi3). A session worker starts with python -m mftik.run module:Class. Class is constructed with no arguments and must be a mftik.Strategy.

CI

GitHub Actions runs on ubuntu-latest. cargo clippy --workspace --all-targets -- -D warnings fails the build on warnings. The workflow also checks formatting, tests, and that the proto tree still matches the pinned commit. scripts/sync-proto-negative appends a line to a temporary copy of that tree and requires scripts/sync-proto --check to fail.

The Python job uses Python 3.11 (E04-D014). It syncs the locked uv tools, runs ruff check and ruff format --check, builds an mftik wheel with maturin, installs that wheel into a fresh environment, and runs tests/python/smoke_import.py, the Python unit tests, mypy.stubtest against mftik._mftik, and the Python session end-to-end tests.

The wheels job builds the two release wheels on every pull request and installs each into a clean virtual environment for the same smoke test (E04-D063): manylinux_2_28 x86_64 and macOS arm64. Both are abi3 wheels for Python 3.11 (cp311-abi3). There is no source distribution. scripts/release-check checks that the workspace version, pyproject.toml, the smoke test's expected version, and mftik.__version__ match.

A v* tag runs .github/workflows/release.yml. That workflow builds those wheels, smokes them, and uploads them to PyPI with trusted publishing from the GitHub environment pypi. The tag is v plus the package version, and the tagged commit is on main. The project owner registers that workflow filename and environment on the existing PyPI project mftik before the tag is pushed. The first tag is v0.14.0, after this work is merged and Yi Te confirms.

The mftiko-conformance job runs the suite on every pull request. scripts/install-mftiko-conformance is the go install of mftiko-conformance from the pinned mftiko commit. The job runs it against the Rust standard strategy examples/conform, keeps report.json as an artifact, and fails on any failed check. To run it locally (Go 1.26 or newer):

GOBIN="$PWD/bin" scripts/install-mftiko-conformance
cargo build --release -p mftik-conform
bin/mftiko-conformance -json report.json -- target/release/conform

Metadata

Release files for mftik 0.14.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for mftik 0.14.0
File Interpreter ABI Platform Actions
mftik-0.14.0-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details for mftik-0.14.0-cp311-abi3-manylinux_2_28_x86_64.whl
mftik-0.14.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for mftik-0.14.0-cp311-abi3-macosx_11_0_arm64.whl

Total release size: 5.4 MB

Release files / mftik-0.14.0-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL mftik-0.14.0-cp311-abi3-manylinux_2_28_x86_64.whl
Size 2.8 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
e4d70abf8c33b06ebae9c405dbee49aff8e3e9835875b8d665fa896654ffa2c4
BLAKE2b-256 checksum
How to use checksums
a0e098d7de5822ba864cb70d984e549db9a3d9d86f47a394ba4e8635146130fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Release files / mftik-0.14.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL mftik-0.14.0-cp311-abi3-macosx_11_0_arm64.whl
Size 2.5 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
450901d45102017c17115f2a41e0368b2e51b3d5c46c1423009507ba8568a01f
BLAKE2b-256 checksum
How to use checksums
de3c010aa269c2b7346455cb3836f0da6968eeee7fbe350d25211c6be7ac06a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Security for mftik 0.14.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mftik-0.14.0-cp311-abi3-manylinux_2_28_x86_64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page