Skip to main content

Selene-Core

Selene is designed to be extensible through the use of plugins, in the form of compiled libraries and lightweight python interfaces that provide configuration for the selene-sim frontend. We achieve this through this selene-core crate and python module.

Each plugin should comprise a python component and a compiled library component. The compiled library implements the Selene plugin API, and the python component provides configuration, link information and the path to the compiled library to the selene frontend.

The selene-core python module provides interfaces for plugins to adhere to. It also provides a bundled include directory, containing C headers for the Selene plugin API for each type of component.

To access the C headers in the build stage of a python package, depend on selene-core as a build dependency and call selene_core.get_include_directory(). The resulting path can be provided to a build system for C or C++ and the plugin APIs can be included through:

#include <selene/simulator.h>   # for the simulator API
#include <selene/error_model.h> # for the error model API
#include <selene/runtime.h>     # for the runtime API

Each header defines a descriptor structure and a packed current-version constant:

  • SELENE_SIMULATOR_CURRENT_API_VERSION
  • SELENE_ERROR_MODEL_CURRENT_API_VERSION
  • SELENE_RUNTIME_CURRENT_API_VERSION

Populate struct_size with sizeof the descriptor, use the corresponding version constant for api_version, and populate every function pointer that is not documented as optional. A plugin must export either the descriptor symbol documented in its header or, preferably, the accessor function. For example, a simulator plugin should export:

static const SeleneSimulatorPluginDescriptorV1 descriptor = {
    .struct_size = sizeof(SeleneSimulatorPluginDescriptorV1),
    .api_version = SELENE_SIMULATOR_CURRENT_API_VERSION,
    /* function pointers */
};

const SeleneSimulatorPluginDescriptorV1 *
selene_simulator_get_plugin_descriptor_v1(void) {
    return &descriptor;
}

The equivalent runtime and error-model accessor names are declared in their respective headers.

Metadata

Release files for selene-core 0.3.4

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

Built distribution (wheel)

Table of built distributions (wheels) for selene-core 0.3.4
File Interpreter ABI Platform Actions
selene_core-0.3.4-py3-none-any.whl Python 3 none any Details for selene_core-0.3.4-py3-none-any.whl

Release files / selene_core-0.3.4-py3-none-any.whl

Download URL selene_core-0.3.4-py3-none-any.whl
Size 40.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
190e468ec72de3ef963802653def69a145dc99c0d98b82035184ba48fd871122
BLAKE2b-256 checksum
How to use checksums
98d3adc263e449855024b56b8aa6c19db775b6c32836c2fd6529aa6d2069ff82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.16

Security for selene-core 0.3.4

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.3.4 This release

1 release file No provenance

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