librt is the Mypyc runtime library, providing efficient C implementations of various Python standard library classes and functions. Mypyc leverages this library to produce faster C extensions when compiling Python code. It is primarily an internal dependency for `mypyc` and `mypy` (since version 1.19.0 for fixed-format cache serialization). The current version is 0.8.1, with development occurring in the main `mypy` repository and releases synced to the `librt` PyPI package.
pip install librtVerified import paths — ran on the pinned version, not inferred.
librt is a runtime library for code compiled with `mypyc`. Therefore, its 'quickstart' involves demonstrating how to use `mypyc` to compile Python code. The compiled code will then depend on `librt` at runtime. The example shows a simple Python function that `mypyc` could compile, implicitly leveraging `librt`'s optimizations.
Avoid using librt-dependent components in PyPy environments or configure CI to exclude librt-related checks/builds for PyPy.
Ensure `librt` is kept in sync with the `mypyc` version used for compilation. Pinning exact versions of `librt` and `mypyc` is recommended, especially in production environments or when distributing `mypyc`-compiled code.
Treat librt as an implementation detail of mypyc. Do not directly import or use symbols from `librt` in your application code; instead, rely on the behavior of `mypyc`-compiled modules.
If upgrading `mypy` to 1.19.0 or newer, ensure `librt` is installed alongside it. For older `mypy` versions, `librt` is not required for cache functionality.
No dependency data recorded yet.