miniproto_native
Provenance
Section titled “Provenance”- Crate:
miniproto_native - Rust visibility:
public - Source:
rust/miniproto/src/lib.rs - Python exposure: Not evidenced by static PyO3 attributes.
Documented items
Section titled “Documented items”cargo-docs-md rendering
Section titled “cargo-docs-md rendering”Crate miniproto_native
Section titled “Crate miniproto_native”Bundled PyO3 acceleration module for miniproto.
Python imports this crate as miniproto._native. It registers native implementations for
cryptographic primitives, encrypted MTProto envelopes, selected TL codecs, and TCP transport
framing. These routines are an optional acceleration layer: the Python package owns the
public fallback policy and must remain correct when this extension cannot be imported.
Quick Reference
Section titled “Quick Reference”| Item | Kind | Description |
|---|---|---|
crypto | mod | Registers cryptographic Python callables. |
generated_tl | mod | Generated TL constructor metadata and field specifications. |
mtproto | mod | Registers encrypted MTProto message-envelope callables. |
tl | mod | Registers primitive and generated fast-path TL codec callables. |
transport | mod | Registers TCP transport framing callables and the stateful codec class. |
_native | fn | Initializes Python module miniproto._native. |
Modules
Section titled “Modules”crypto— Registers cryptographic Python callables.generated_tl— Generated TL constructor metadata and field specifications.mtproto— Registers encrypted MTProto message-envelope callables.tl— Registers primitive and generated fast-path TL codec callables.transport— Registers TCP transport framing callables and the stateful codec class.
Functions
Section titled “Functions”_native
Section titled “_native”fn _native(m: &Bound<'_, pyo3::types::PyModule>) -> PyResult<()>Defined in rust/miniproto/src/lib.rs:34-40
Initializes Python module miniproto._native.
PyO3 declares this module usable without the GIL (gil_used = false), but individual exports
still acquire or release it as required by their Python-object interactions. Returns a Python
exception if any submodule registration fails.
Arguments
Section titled “Arguments”m: The newly-createdminiproto._nativePython module receiving the registered exports.