Registry / other / specs-derive

specs-derive

JSON →
library0.4.1rscratesunverified

Custom derive macro for Specs components, enabling automatic implementation of component traits.

# Cargo.toml [dependencies] specs-derive = "0.4.1"
INSTALL
IMPORT
SIG · SPECS-DERIVE
S
specs-derive
otherrustv0.4.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Component
use specs_derive::Component;

Derive the Component trait for a struct.

use specs_derive::Component; use specs::prelude::*; #[derive(Component)] struct Position { x: f32, y: f32, } fn main() { let mut world = World::new(); world.register::<Position>(); world.create_entity().with(Position { x: 0.0, y: 0.0 }).build(); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.4.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
specs-derive — cargo add specs-derive · libregistry