Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

shipyard

> 编程语言
Open source

Entity Component System focused on usability and flexibility.

877 stars0 likes1 views
WebsiteGitHub

About

Entity Component System focused on usability and flexibility.

Basic Example

rust
use shipyard::{Component, IntoIter, View, ViewMut, World};

#[derive(Component)]
struct Health(u32);
#[derive(Component)]
struct Position {
    x: f32,
    y: f32,
}

fn in_acid(positions: View, mut healths: ViewMut) {
    for (_, health) in (&positions, &mut healths)
        .iter()
        .filter(|(pos, _)| is_in_acid(pos))
    {
        health.0 -= 1;
    }
}

fn is_in_acid(_: &Position) -> bool {
    // it's wet season
    true
}

fn main() {
    let mut world = World::new();

    world.add_entity((Position { x: 0.0, y: 0.0 }, Health(1000)));

    world.run(in_acid);
}

Small Game Example

Inspired by Erik Hazzard's Rectangle Eater.

Cargo Features

  • parallel (default) — enables workload threading and add parallel iterators
  • extended_tuple — extends implementations from the default 10 to 32 tuple size at the cost of 4X build time
  • proc (default) — re-exports macros from shipyard_proc, mainly to derive Component
  • serde1 — adds (de)serialization support with serde
  • std (default) — lets Shipyard use the standard library
  • thread_local — adds methods and types required to work with !Send and !Sync components
  • tracing — reports workload and system execution

Origin of the name

Assembly lines take input, process it at each step, and output a result. You can have multiple lines working in parallel as long as they don't cross paths.

Shipyards such as the Venetian Arsenal are some of the oldest examples of successful, large-scale, industrial assembly lines.
So successful that it could output a fully-finished ship every day.

Shipyard is a library you can use to build your own highly-parallel software.

Motivation

I initially wanted to make an ECS to learn how they work. After a failed attempt and some research, I started working on Shipyard.

Specs was already well established as the go-to Rust ECS but I thought I could do better and went with EnTT's core data-structure (SparseSet) and grouping model. A very flexible combo.

License

Licensed under either of

  • Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.

Contributing

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustarchitectural-patternsdata-orientedecsentity-component

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言