All docs
Docs/ API Reference/ lsdtools.ecs reference
API Reference

lsdtools.ecs reference

Generated public SDK reference for lsdtools.ecs.

SDK distribution 1.0.0; API contract 1.0; generator 1.0.0.

Product source digest: 170db6f659e9f79609ddaaec494ffad41f1d659a96001371132843e0c17a7e27.

Generated from declared public exports and source syntax. Signatures and annotations are declaration spellings; decorators, factories and annotations are never executed. Class members below are declared members; base classes remain explicit. Source docstrings describe their owning implementation; they do not grant app permissions.

text
Lazy public runtime-engine surface; importing this facade loads no DLL.

The runtime engine (``lsd-ecs``) is the native entity-component store every simulation
participant executes on. A package reaches it here -- never ``import lsd_ecs`` -- to declare
components, hold a world of its own, or read the engine's capabilities as data.

lsdtools.ecs.ColumnView#

Kind: class. Source: core/ecs/src/lsd_ecs/world.py:154.

Source docstring:

text
A numpy view over one page of a component: ``array[row]`` is the entity with index
``first + row``. Zero-copy; ``check`` refuses the view after a staged commit replaced the
page.

Implementation alias: lsd_ecs.world.ColumnView.

lsdtools.ecs.ColumnView.component#

Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:159.

Python
component: Component

lsdtools.ecs.ColumnView.array#

Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:160.

Python
array: np.ndarray

lsdtools.ecs.ColumnView.stage#

Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:161.

Python
stage: np.ndarray | None

lsdtools.ecs.ColumnView.first#

Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:162.

Python
first: int

lsdtools.ecs.ColumnView.rows#

Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:163.

Python
rows: int

lsdtools.ecs.ColumnView.count#

Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:164.

Python
count: int

lsdtools.ecs.ColumnView.pages#

Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:165.

Python
pages: int

lsdtools.ecs.ColumnView.layout_epoch#

Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:166.

Python
layout_epoch: int

lsdtools.ecs.ColumnView.check#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:169.

Python
check(self) -> ColumnView
Python
self: (unannotated)

lsdtools.ecs.Component#

Kind: class. Source: core/ecs/src/lsd_ecs/components.py:29.

Source docstring:

text
A component: ``dtype`` scalars, ``shape`` ``()`` for one per row or ``(k,)`` for a vector.

A ``bytes`` component is an opaque fixed-size struct: ``shape`` is ``(size,)`` and ``align`` its
alignment (a power of two up to 64). ``staged`` keeps a second page the writer fills and commits
(``World.commit``); ``reserve`` allocates the pages for that many entity indices up front.

Implementation alias: lsd_ecs.components.Component.

lsdtools.ecs.Component.name#

Kind: attribute. Source: core/ecs/src/lsd_ecs/components.py:37.

Python
name: str

lsdtools.ecs.Component.dtype#

Kind: attribute. Source: core/ecs/src/lsd_ecs/components.py:38.

Python
dtype: str
Python
dtype = 'float64'

lsdtools.ecs.Component.shape#

Kind: attribute. Source: core/ecs/src/lsd_ecs/components.py:39.

Python
shape: tuple[int, ...]
Python
shape = ()

lsdtools.ecs.Component.staged#

Kind: attribute. Source: core/ecs/src/lsd_ecs/components.py:40.

Python
staged: bool
Python
staged = False

lsdtools.ecs.Component.align#

Kind: attribute. Source: core/ecs/src/lsd_ecs/components.py:41.

Python
align: int
Python
align = 0

lsdtools.ecs.Component.reserve#

Kind: attribute. Source: core/ecs/src/lsd_ecs/components.py:42.

Python
reserve: int
Python
reserve = 0

lsdtools.ecs.Component.width#

Kind: method. Source: core/ecs/src/lsd_ecs/components.py:74.

Python
width(self) -> int
Python
self: (unannotated)

Source docstring:

text
Scalars per row (bytes per row for a bytes component).

lsdtools.ecs.Component.itemsize#

Kind: method. Source: core/ecs/src/lsd_ecs/components.py:79.

Python
itemsize(self) -> int
Python
self: (unannotated)

lsdtools.ecs.Component.stride#

Kind: method. Source: core/ecs/src/lsd_ecs/components.py:83.

Python
stride(self) -> int
Python
self: (unannotated)

lsdtools.ecs.Component.numpy_dtype#

Kind: method. Source: core/ecs/src/lsd_ecs/components.py:88.

Python
numpy_dtype(self) -> np.dtype
Python
self: (unannotated)

Source docstring:

text
The dtype of one row: the scalar dtype, or ``V<stride>`` for a bytes component.

lsdtools.ecs.EcsError#

Kind: class. Source: core/ecs/src/lsd_ecs/errors.py:14.

Source docstring:

text
Something about a world, a component, a query or a system was refused.

Implementation alias: lsd_ecs.errors.EcsError.

Declared bases: RuntimeError.

lsdtools.ecs.EcsStatusError#

Kind: class. Source: core/ecs/src/lsd_ecs/errors.py:22.

Python
EcsStatusError(self, status: int, label: str, export: str) -> None

Source docstring:

text
A native export answered a status other than ``ok``.

Implementation alias: lsd_ecs.errors.EcsStatusError.

Declared bases: EcsError.

lsdtools.ecs.EcsStatusError.__init__#

Kind: method. Source: core/ecs/src/lsd_ecs/errors.py:25.

Python
__init__(self, status: int, label: str, export: str) -> None
Python
export: str
label: str
self: (unannotated)
status: int

lsdtools.ecs.EcsStatusError.status#

Kind: attribute. Source: core/ecs/src/lsd_ecs/errors.py:27.

Python
status: (unannotated)
Python
status = int(status)

lsdtools.ecs.EcsStatusError.label#

Kind: attribute. Source: core/ecs/src/lsd_ecs/errors.py:28.

Python
label: (unannotated)
Python
label = str(label)

lsdtools.ecs.EcsStatusError.export#

Kind: attribute. Source: core/ecs/src/lsd_ecs/errors.py:29.

Python
export: (unannotated)
Python
export = str(export)

lsdtools.ecs.NONE#

Kind: value. Source: core/ecs/src/lsd_ecs/_abi.py:47.

Python
NONE = 4294967295

Implementation alias: lsd_ecs._abi.NONE.

lsdtools.ecs.NUMERIC_DTYPES#

Kind: value. Source: core/ecs/src/lsd_ecs/components.py:14.

Python
NUMERIC_DTYPES: tuple[str, ...]
Python
NUMERIC_DTYPES = ('float64', 'float32', 'int64', 'int32', 'int16', 'int8', 'uint64', 'uint32', 'uint16', 'uint8')

Implementation alias: lsd_ecs.components.NUMERIC_DTYPES.

lsdtools.ecs.NativeUnavailableError#

Kind: class. Source: core/ecs/src/lsd_ecs/errors.py:18.

Source docstring:

text
The native engine is not admitted in this process; ``engine_refusal()`` says why.

Implementation alias: lsd_ecs.errors.NativeUnavailableError.

Declared bases: EcsError.

lsdtools.ecs.PhysicsBridge#

Kind: class. Source: core/ecs/src/lsd_ecs/_abi.py:199.

Source docstring:

text
``lsd_ecs_physics_bridge_v1``: what the physics lane binds (pointers stay the caller's).

Implementation alias: lsd_ecs._abi.PhysicsBridge.

Declared bases: C.Structure.

lsdtools.ecs.Query#

Kind: class. Source: core/ecs/src/lsd_ecs/world.py:94.

Source docstring:

text
A cached set of matching entities.

Implementation alias: lsd_ecs.world.Query.

lsdtools.ecs.Query.world#

Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:97.

Python
world: World

lsdtools.ecs.Query.id#

Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:98.

Python
id: int

lsdtools.ecs.Query.require#

Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:99.

Python
require: tuple[str, ...]

lsdtools.ecs.Query.exclude#

Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:100.

Python
exclude: tuple[str, ...]

lsdtools.ecs.Query.entities#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:102.

Python
entities(self) -> np.ndarray
Python
self: (unannotated)

Source docstring:

text
The matched handles right now (a copy; the query's order until ``sort``).

lsdtools.ecs.Query.sort#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:109.

Python
sort(self) -> None
Python
self: (unannotated)

lsdtools.ecs.Query.range#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:112.

Python
range(self) -> tuple[int, int] | None
Python
self: (unannotated)

Source docstring:

text
``(first, count)`` when the matches are one run of entity indices (``first + k`` is the
k-th match; a system may then walk the pages' rows directly), else ``None``. Joins keep a
run only at its tail and leaves only of its tail; ``sort`` makes contiguous indices a
run.

lsdtools.ecs.StaleEntityError#

Kind: class. Source: core/ecs/src/lsd_ecs/errors.py:32.

Source docstring:

text
An entity handle names a generation the world destroyed.

Implementation alias: lsd_ecs.errors.StaleEntityError.

Declared bases: EcsError, KeyError.

lsdtools.ecs.StaleLeaseError#

Kind: class. Source: core/ecs/src/lsd_ecs/errors.py:36.

Source docstring:

text
A column view was used after the pool's layout changed under it.

Implementation alias: lsd_ecs.errors.StaleLeaseError.

Declared bases: EcsError.

lsdtools.ecs.StepInfo#

Kind: class. Source: core/ecs/src/lsd_ecs/world.py:82.

Source docstring:

text
What a system receives about the step it runs in.

Implementation alias: lsd_ecs.world.StepInfo.

lsdtools.ecs.StepInfo.dt#

Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:85.

Python
dt: float

lsdtools.ecs.StepInfo.time_us#

Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:86.

Python
time_us: int

lsdtools.ecs.StepInfo.tick#

Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:87.

Python
tick: int

lsdtools.ecs.StepInfo.substeps#

Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:88.

Python
substeps: int

lsdtools.ecs.StepInfo.phase#

Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:89.

Python
phase: str

lsdtools.ecs.StepInfo.system#

Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:90.

Python
system: int

lsdtools.ecs.System#

Kind: class. Source: core/ecs/src/lsd_ecs/world.py:134.

Implementation alias: lsd_ecs.world.System.

lsdtools.ecs.System.world#

Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:135.

Python
world: World

lsdtools.ecs.System.id#

Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:136.

Python
id: int

lsdtools.ecs.System.name#

Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:137.

Python
name: str

lsdtools.ecs.System.query#

Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:138.

Python
query: Query | None

lsdtools.ecs.System.phase#

Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:139.

Python
phase: str

lsdtools.ecs.System.enable#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:141.

Python
enable(self, enabled: bool=True) -> None
Python
enabled: bool
self: (unannotated)

lsdtools.ecs.System.run#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:146.

Python
run(self, dt: float=0.0, *, substeps: int=1, time_us: int=0) -> None
Python
dt: float
self: (unannotated)
substeps: int
time_us: int

lsdtools.ecs.System.profile#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:149.

Python
profile(self) -> dict[str, int]
Python
self: (unannotated)

lsdtools.ecs.World#

Kind: class. Source: core/ecs/src/lsd_ecs/world.py:184.

Python
World(self, *, max_components: int=64, entities: int=1024, page_rows: int=0, profile: bool=False, single_page: bool=False) -> None

Source docstring:

text
One native runtime store.

Implementation alias: lsd_ecs.world.World.

lsdtools.ecs.World.__init__#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:187.

Python
__init__(self, *, max_components: int=64, entities: int=1024, page_rows: int=0, profile: bool=False, single_page: bool=False) -> None
Python
entities: int
max_components: int
page_rows: int
profile: bool
self: (unannotated)
single_page: bool

Source docstring:

text
``single_page`` makes every component one page of exactly ``entities`` rows (any count):
each column is one contiguous array whose row is the entity index, and the world holds at
most ``entities`` entities (the Trip's row layout).

lsdtools.ecs.World.close#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:224.

Python
close(self) -> None
Python
self: (unannotated)

lsdtools.ecs.World.__enter__#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:229.

Python
__enter__(self) -> World
Python
self: (unannotated)

lsdtools.ecs.World.__exit__#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:232.

Python
__exit__(self, *exc) -> None
Python
exc: (unannotated)
self: (unannotated)

lsdtools.ecs.World.closed#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:240.

Python
closed(self) -> bool
Python
self: (unannotated)

lsdtools.ecs.World.page_rows#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:244.

Python
page_rows(self) -> int
Python
self: (unannotated)

lsdtools.ecs.World.single_page#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:248.

Python
single_page(self) -> bool
Python
self: (unannotated)

lsdtools.ecs.World.define#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:257.

Python
define(self, component: Component | str, *, dtype: str='float64', shape: tuple[int, ...]=(), staged: bool=False, align: int=0, reserve: int=0) -> Component
Python
align: int
component: Component | str
dtype: str
reserve: int
self: (unannotated)
shape: tuple[int, ...]
staged: bool

Source docstring:

text
Define a component (a ``Component`` or a name plus its shape); returns the
declaration.

lsdtools.ecs.World.components#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:289.

Python
components(self) -> tuple[Component, ...]
Python
self: (unannotated)

lsdtools.ecs.World.component_id#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:292.

Python
component_id(self, name: str) -> int
Python
name: str
self: (unannotated)

lsdtools.ecs.World.defined#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:298.

Python
defined(self, name: str) -> bool
Python
name: str
self: (unannotated)

lsdtools.ecs.World.reserve#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:301.

Python
reserve(self, name: str, rows: int) -> None
Python
name: str
rows: int
self: (unannotated)

Source docstring:

text
Allocate the pages for entity indices below ``rows`` now, so later adds allocate
nothing.

lsdtools.ecs.World.create#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:310.

Python
create(self, count: int | None=None) -> int | np.ndarray
Python
count: int | None
self: (unannotated)

Source docstring:

text
Create ``count`` entities (a ``uint64`` array), or one (an ``int``) when ``count`` is
None.

lsdtools.ecs.World.destroy#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:325.

Python
destroy(self, entities: EntityLike) -> None
Python
entities: EntityLike
self: (unannotated)

lsdtools.ecs.World.alive#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:341.

Python
alive(self, entity: int) -> bool
Python
entity: int
self: (unannotated)

lsdtools.ecs.World.add#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:346.

Python
add(self, name: str, entities: EntityLike, values: np.ndarray | None=None) -> None
Python
entities: EntityLike
name: str
self: (unannotated)
values: np.ndarray | None

Source docstring:

text
Give the component to the entities, zeroed or from ``values`` (one row per entity).

lsdtools.ecs.World.remove#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:373.

Python
remove(self, name: str, entities: EntityLike) -> None
Python
entities: EntityLike
name: str
self: (unannotated)

lsdtools.ecs.World.has#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:385.

Python
has(self, name: str, entity: int) -> bool
Python
entity: int
name: str
self: (unannotated)

lsdtools.ecs.World.set#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:392.

Python
set(self, name: str, entity: int, value) -> None
Python
entity: int
name: str
self: (unannotated)
value: (unannotated)

Source docstring:

text
Write one row (adding the component when the entity lacks it).

lsdtools.ecs.World.get#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:406.

Python
get(self, name: str, entity: int)
Python
entity: int
name: str
self: (unannotated)

Source docstring:

text
One row as a numpy scalar (shape ``()``) or vector (a copy); ``None`` when absent.

lsdtools.ecs.World.column#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:455.

Python
column(self, name: str, page: int=0) -> ColumnView
Python
name: str
page: int
self: (unannotated)

Source docstring:

text
A zero-copy numpy view over one page of the component (``rows`` rows from entity index
``first``); rows of entities without the component hold unspecified bytes. The page is
allocated when it does not exist yet.

lsdtools.ecs.World.commit#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:492.

Python
commit(self, name: str) -> None
Python
name: str
self: (unannotated)

Source docstring:

text
Swap the staged pages of a staged component in.

lsdtools.ecs.World.bind#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:496.

Python
bind(self, name: str, array: np.ndarray, *, page: int=0, mark: bool=True) -> np.ndarray
Python
array: np.ndarray
mark: bool
name: str
page: int
self: (unannotated)

Source docstring:

text
Make ``array`` the page: the world reads and writes its memory as the component's rows
(``array[row]`` is the entity with index ``first + row``) and never frees it; the world
keeps a reference so the memory outlives every use. ``array`` must be C-contiguous, of the
component's dtype and ``(page_rows, *shape)``; ``mark`` adds the component to the page's
live entities without writing a byte (a read-only array binds as well: the world writes it
only through a system or ``set``). Binding the memory that already is the page moves
nothing (the page's lease epoch holds) and marks again.

lsdtools.ecs.World.bound#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:534.

Python
bound(self, name: str, page: int=0) -> np.ndarray | None
Python
name: str
page: int
self: (unannotated)

Source docstring:

text
The array bound as the page, or ``None`` when the world allocated the page itself.

lsdtools.ecs.World.records#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:538.

Python
records(self) -> np.ndarray
Python
self: (unannotated)

Source docstring:

text
The entity table as a read-only ``(entities, record)`` uint64 view: the mask words, then
the generation word (bit 31 set while free), then padding to the record's power of two.
Valid until the next entity creation.

lsdtools.ecs.World.rows#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:561.

Python
rows(self, name: str) -> np.ndarray
Python
name: str
self: (unannotated)

Source docstring:

text
The entity indices holding the component, ascending (a copy).

lsdtools.ecs.World.handles#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:572.

Python
handles(self, indices: np.ndarray) -> np.ndarray
Python
indices: np.ndarray
self: (unannotated)

Source docstring:

text
The current handles of entity indices (from the generation table).

lsdtools.ecs.World.query#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:581.

Python
query(self, require: Iterable[str]=(), exclude: Iterable[str]=()) -> Query
Python
exclude: Iterable[str]
require: Iterable[str]
self: (unannotated)

lsdtools.ecs.World.system#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:615.

Python
system(self, fn: SystemFn, query: Query, phase: str='step', name: str | None=None) -> System
Python
fn: SystemFn
name: str | None
phase: str
query: Query
self: (unannotated)

Source docstring:

text
Bind ``fn(world, entities, step)`` to the query in one phase; ``entities`` is a view of
the
query's matches valid during the call only.

lsdtools.ecs.World.systems#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:668.

Python
systems(self) -> tuple[System, ...]
Python
self: (unannotated)

lsdtools.ecs.World.bind_physics#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:671.

Python
bind_physics(self, name: str, bridge: PhysicsBridge) -> System
Python
bridge: PhysicsBridge
name: str
self: (unannotated)

Source docstring:

text
Bind the physics lane as a native ``step`` system: it steps the physics world once per
fixed step through the bound ``lsd_physics_world_step_scatter_v1`` and scatters the poses
into the scene's transform components. Every pointer in ``bridge`` stays the caller's and
must outlive the world.

lsdtools.ecs.World.rebind_physics#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:688.

Python
rebind_physics(self, system: System, bridge: PhysicsBridge) -> None
Python
bridge: PhysicsBridge
self: (unannotated)
system: System

Source docstring:

text
Point a bound lane at other columns (the same physics world and row count): the body
columns moved, as a swap-in commit of a Trip value moves them.

lsdtools.ecs.World.unbind_physics#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:693.

Python
unbind_physics(self, system: System) -> None
Python
self: (unannotated)
system: System

Source docstring:

text
Release a lane before its physics world or its columns go away: the system never runs
again and ``physics_status`` refuses it.

lsdtools.ecs.World.physics_status#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:698.

Python
physics_status(self, system: System) -> tuple[int, int, int]
Python
self: (unannotated)
system: System

Source docstring:

text
The bridge's last step: (physics status, frames done, steps so far).

lsdtools.ecs.World.step#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:722.

Python
step(self, steps: int=1, dt: float=1.0 / 60.0, *, substeps: int=1, time_us: int=0) -> None
Python
dt: float
self: (unannotated)
steps: int
substeps: int
time_us: int

Source docstring:

text
Run ``steps`` fixed steps: the before, step and after systems, in definition order. An
exception a Python system raised is re-raised here, after the engine call returned.

lsdtools.ecs.World.run_phase#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:733.

Python
run_phase(self, phase: str, dt: float=0.0, *, substeps: int=1, time_us: int=0) -> None
Python
dt: float
phase: str
self: (unannotated)
substeps: int
time_us: int

lsdtools.ecs.World.run#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:741.

Python
run(self, system: System, dt: float=0.0, *, substeps: int=1, time_us: int=0) -> None
Python
dt: float
self: (unannotated)
substeps: int
system: System
time_us: int

lsdtools.ecs.World.hash#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:749.

Python
hash(self) -> int
Python
self: (unannotated)

lsdtools.ecs.World.capture#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:754.

Python
capture(self) -> bytes
Python
self: (unannotated)

lsdtools.ecs.World.restore#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:767.

Python
restore(self, capture: bytes) -> None
Python
capture: bytes
self: (unannotated)

lsdtools.ecs.World.counters#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:774.

Python
counters(self) -> dict[str, int]
Python
self: (unannotated)

lsdtools.ecs.World.set_profiling#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:779.

Python
set_profiling(self, level: int) -> None
Python
level: int
self: (unannotated)

lsdtools.ecs.World.phase_profile#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:782.

Python
phase_profile(self, phase: str) -> tuple[int, int]
Python
phase: str
self: (unannotated)

Source docstring:

text
The last run of every enabled system of ``phase``, summed: (nanoseconds, entities
visited).

lsdtools.ecs.World.profile#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:789.

Python
profile(self, system: System) -> dict[str, int]
Python
self: (unannotated)
system: System

lsdtools.ecs.World.describe#

Kind: method. Source: core/ecs/src/lsd_ecs/world.py:794.

Python
describe(self) -> dict[str, object]
Python
self: (unannotated)

Source docstring:

text
The world as data: counters, components, queries and systems with their profiles.

lsdtools.ecs.capabilities#

Kind: function. Source: core/ecs/src/lsd_ecs/__init__.py:64.

Python
capabilities() -> dict

Source docstring:

text
The engine as data: whether it is admitted, its artifact and ABI digests, its limits.

Implementation alias: lsd_ecs.capabilities.

lsdtools.ecs.engine_refusal#

Kind: function. Source: core/ecs/src/lsd_ecs/__init__.py:57.

Python
engine_refusal()

Source docstring:

text
Why the native engine is not admitted in this process, or None when it is.

Implementation alias: lsd_ecs.engine_refusal.

lsdtools.ecs.entity_generation#

Kind: function. Source: core/ecs/src/lsd_ecs/world.py:63.

Python
entity_generation(entity: int) -> int
Python
entity: int

Implementation alias: lsd_ecs.world.entity_generation.

lsdtools.ecs.entity_index#

Kind: function. Source: core/ecs/src/lsd_ecs/world.py:59.

Python
entity_index(entity: int) -> int
Python
entity: int

Implementation alias: lsd_ecs.world.entity_index.

lsdtools.ecs.make_entity#

Kind: function. Source: core/ecs/src/lsd_ecs/world.py:67.

Python
make_entity(index: int, generation: int=0) -> int
Python
generation: int
index: int

Implementation alias: lsd_ecs.world.make_entity.

lsdtools.ecs.memory_trim#

Kind: function. Source: core/ecs/src/lsd_ecs/world.py:831.

Python
memory_trim() -> int

Source docstring:

text
Return the blocks closed worlds left for reuse to the OS; the bytes released.

Implementation alias: lsd_ecs.world.memory_trim.

lsdtools.ecs.ns_per_entity_system#

Kind: function. Source: core/ecs/src/lsd_ecs/semantics.py:119.

Python
ns_per_entity_system(step_ns: int, entities: int, systems: int=1) -> float | None
Python
entities: int
step_ns: int
systems: int

Source docstring:

text
`per-entity`: simulation-thread nanoseconds per entity per system; None when nothing was
visited.

Implementation alias: lsd_ecs.semantics.ns_per_entity_system.

By LSD Team · Last updated Oct 19, 2026 Ask a question View as Markdown
Type to search every doc, guide, and tutorial.
↑↓ navigate↵ openesc close