e2m2e.spice_ext#

Thin shared-kernel binding for the Rust extension's SPICE surface.

The data layer must drive the Rust-side cspice instance directly: it keeps its own kernel pool, separate from the Python spiceypy instance (dual-instance bridge, ADR 0016), so kernel load/unload and the ephemeris-cache switches have to reach spice_furnsh/spice_unload/enable_ephem_cache/ disable_ephem_cache without routing through the numerics facade e2m2e.integrators (which itself reaches the algorithm layer). This package-root leaf is that legal channel: importable by every layer, importing no layer itself (ADR 0039). It also owns the extension ABI gate shared with the facade—_check_rust_abi/_abi_ok—and a require_rust_extension checking its own module-level symbols; the facade keeps a thin shell with the same behaviour, checking facade globals.

Attributes#

Functions#

require_rust_extension(→ None)

确保 Rust 扩展可用且指定的模块级符号存在;否则抛 RustExtensionUnavailableError。

Module Contents#

e2m2e.spice_ext.disable_ephem_cache: Any#
e2m2e.spice_ext.require_rust_extension(*required_symbols: str) → None#

确保 Rust 扩展可用且指定的模块级符号存在;否则抛 RustExtensionUnavailableError。

在使用 Rust 扩展符号的每个入口调用。扩展未构建、构建不含 spice feature、或符号缺失时,抛带 make dev 指引的 RustExtensionUnavailableError,不允许静默回退到 Python/scipy。 required_symbols 是 e2m2e.spice_ext 模块级 符号名;扩展缺失时符号为 None。

Example:
>>> require_rust_extension("spice_furnsh", "enable_ephem_cache")