tpt-shipyard
RustOpen-source, MIT-licensed pure-Rust engine for vehicle construction: sea shipyards, orbital assembly, in-space manufacturing, and construction digital twins. Build anything, anywhere — no gravity constraints, no launch limits, no proprietary lock-in.
Languages
tpt-shipyard
A fully open-source, MIT-licensed computational engine for vehicle construction: sea shipyards, orbital assembly, in-space manufacturing, and construction digital twins.
Build Anything, Anywhere. Sea or Space. No Gravity Constraints. No Proprietary Lock-in.
┌─────────────────────────────────────────────────────────────┐
│ THE VEHICLE LIFECYCLE STACK │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ tpt- │ │ tpt- │ │ tpt- │ │ (end of │ │
│ │transport │→ │ shipyard │→ │transport │→ │ life) │ │
│ │ (design) │ │ (build) │ │(operate) │ │ │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
│ │
│ SEA SPACE BOTH │
│ Drydock / Slipway OrbitalAssembly Digital Twin │
│ Launch / Outfit In-space Mfg Weight & CoG │
│ │
└─────────────────────────────────────────────────────────────┘
Crates
Every crate ships its own README.md (overview, features, usage, verification)
and CHANGELOG.md; crates.io keywords and categories are declared in each
manifest. See for example
crates/structural/tpt-yard-welding.
Status legend: Done = implemented and verified against analytical/golden
cases. Simplified model = working, but with documented modelling
simplifications (see each crate's README — several are roadmap items to
deepen). Stand-in = a thin, honest bridge awaiting the companion
tpt-transport / tpt-process / tpt-earth substrates.
| Crate | Description | Status |
|---|---|---|
tpt-yard-core | Core shipyard types: vessel projects, build phases, activities | Done |
tpt-yard-assembly | Shared assembly-activity primitives: dependency graphs | Done |
tpt-yard-weight | Weight and CoG management | Done |
tpt-yard-digital-twin | Construction state tracking and simulation | Done |
tpt-yard-structural | Structural analysis during build | Simplified model (3-D truss + 2-D frame + plate FEM: BFS thin and MITC4 Mindlin elements, penalty BCs, sparse CG/Cholesky) |
tpt-yard-welding | Welding simulation | Done (analytical Rosenthal, experimentally verified) |
tpt-yard-distortion | Block distortion management | Simplified model (threshold-based correction planning) |
tpt-yard-joints | Shared joint-geometry primitives | Done (closed-form groove/fillet geometry) |
tpt-yard-hull | Hull block construction | Done (pre-design weight estimate) |
tpt-yard-blocks | Block lifting and sling loads | Done |
tpt-yard-drydock | Drydock flooding and ballast sequencing | Simplified model (rectangular-block hydrostatics) |
tpt-yard-launch | Launch calculations | Simplified model (statics screening + dynamic slipway simulation with stern-lift/poppet/way-moment series) |
tpt-yard-outfitting | Systems installation and routing | Simplified model (AABB routing checks) |
tpt-yard-sea-trials | Sea-trial test planning | Done |
tpt-yard-hydrostatics | Hydrostatics, GZ curves, IMO 2008 stability, hull-girder strength, damage stability, scantlings | Simplified model (prismatic screen, plus hull-offsets hydrostatics and constant-displacement GZ from a CSV offsets table; Bonjean/cross-curves, SOLAS probabilistic damage stability (cargo, multi-zone, with r- and v-factors), local plate scantlings + Euler/EN 1993-1-5 buckling shipped; class (CSR) buckling curves and rule minimum-thickness tables on roadmap) |
tpt-yard-orbital-assembly | Orbital assembly planning | Simplified model (greedy sequence, kinematic checks) |
tpt-yard-space-structural | Structures without launch constraints | Simplified model (analytical screening) |
tpt-yard-space-manufacturing | In-space manufacturing and additive construction | Simplified model (estimate-grade constants) |
tpt-yard-robotic-assembly | Robotic arm planning | Simplified model (planar RRT, 2-4 link arms) |
tpt-yard-habitat | Rotating habitat design | Simplified model (analytical shell stress) |
tpt-yard-propellant | Propellant loading and boil-off management | Simplified model (lump-parameter thermal) |
tpt-yard-scheduling | Construction scheduling | Done (exact CPM; Monte Carlo risk with delivery/weather gates; capacity-aware levelling at exact breakpoints) |
tpt-yard-logistics | Material and resource logistics | Simplified model (flow accounting) |
tpt-yard-facility | Shipyard facility layout planning | Done (plan-view capacity/placement) |
tpt-yard-quality | Quality control and inspection | Simplified model (plan generation only) |
tpt-yard-transport-link | Vehicle design ⇄ construction bridge | Stand-in (awaits the tpt-transport substrate) |
tpt-yard-process-link | Process engineering bridge | Stand-in (awaits the tpt-process substrate) |
tpt-yard-earth-link | Weather/sea-state bridge | Stand-in (awaits the tpt-earth substrate) |
tpt-yard-cli | CLI: validate / plan / schedule / risk / report / new / html-report / pdf-report | Done |
tpt-yard | Facade: one dependency, curated prelude, feature flags | Done |
tpt-yard-wasm | WebAssembly bindings for dashboards | Simplified model (browser tests in CI; 3-D three.js dashboard shipped) |
tpt-yard-py | Python bindings (PyO3; detached from the workspace build) | First slice (DigitalTwin + HullForm; CI job exercises both) |
Quick Start
The easiest way in is the tpt-yard facade — one
dependency with a curated prelude and sea/space/planning/wasm
feature flags. Or depend on tpt-yard-digital-twin directly and define the
erection plan:
use tpt_yard_assembly::ActivityId;
use tpt_yard_core::{ActivityType, AssemblyActivity, BuildPhase, ConstructionMethod,
PhaseId, ProjectId, SeaVesselType, VesselProject, VesselType};
use tpt_yard_digital_twin::DigitalTwin;
// One erection activity per block; dependencies gate the order.
let mut phase = BuildPhase::new(PhaseId(1), "Erection", 4.0);
for i in 1..=3u64 {
let deps: Vec<ActivityId> = if i == 1 { vec![] } else { vec![ActivityId(i - 1)] };
phase.activities.push(
AssemblyActivity::new(ActivityId(i), format!("Erect block {i}"), ActivityType::JoinBlock, 6.0)
.with_dependencies(&deps),
);
}
let project = VesselProject::new(
ProjectId(1),
"Demo barge",
VesselType::Sea(SeaVesselType::ContainerShip { teu_capacity: 800 }),
ConstructionMethod::SeaDrydock,
vec![phase],
)
.unwrap();
let mut twin = DigitalTwin::new(project);
// Collect the ids first: `advance_phase` takes `&mut twin`, and the
// activity list borrows `twin.vessel`.
let ids: Vec<ActivityId> = twin
.vessel
.build_phases
.iter()
.flat_map(|p| p.activities.iter().map(|a| a.id))
.collect();
for id in &ids {
twin.advance_phase(id).expect("activity must be sound to run");
}
println!(
"{}/{} activities complete, phase {:?}",
twin.assembly_state.completed_activities.len(),
ids.len(),
twin.vessel.current_phase
);
DigitalTwin::new tracks the plan and structure; pass a populated
WeightModel to
DigitalTwin::with_weight_model (wiring each item's installed_by to an
activity) and the twin also tracks installed mass and CoG as erection
proceeds — see the tpt-yard-digital-twin docs and the worked examples.
Run a complete worked example with
cargo run -p container-ship-block-assembly; sample vessel projects ship in
test-data/. The examples/ directory covers block assembly, a submarine
pressure hull, drydock flooding, orbital truss assembly, a rotating habitat,
and in-space solar-array manufacturing.
Stability from the command line
Hydrostatics, the GZ curve and the IMO 2008 intact-stability criteria for a loading condition, from a hull-offsets CSV (full form) or prismatic coefficients (screening):
cargo run -p tpt-yard-cli -- new-hull workboat --out my-hull # offsets CSV + case file
cargo run -p tpt-yard-cli -- stability my-hull/workboat.json --csv out --svg gz.svg --strict
new-hull writes a runnable starting point (wigley, barge, workboat, tug, sailboat or ferry,
every dimension adjustable); replace its offsets CSV with your own lines
plan to analyse your hull. --strict exits non-zero when a criterion fails, so it drops straight into
CI; --json gives machine-readable output. The Wigley offsets in
test-data/stability/ are checked against the hull's closed-form
hydrostatics. See the stability chapter.
Geometry leaves the engine in open formats: tpt_yard::export::geometry_to_gltf
writes a self-contained glTF 2.0 document for web viewers,
tpt_yard::export::elements_to_ifc writes an IFC4 (STEP) file for BIM tools,
and Python bindings (crates/bindings/tpt-yard-py, PyO3) expose the digital
twin and hull hydrostatics directly from Python.
Build Anything, Anywhere
tpt-shipyard supports:
- Sea shipyards — block construction, drydock flooding, slipway launch, outfitting, sea trials
- Orbital assembly — robotic, microgravity, constraint-checked assembly sequences
- In-space manufacturing — additive construction, ISRU feedstock, print planning
- Rotating habitats — O'Neill cylinders, Stanford torus, Bernal spheres
No gravity constraints. No aerodynamic limits. No proprietary lock-in.
A spacecraft built in space is not a rocket
On Earth, every spacecraft is constrained by aerodynamic drag, Max-Q, fairing diameter
limits, launch vibration, and gravity sag during horizontal assembly. In orbit, none of
these constraints exist. tpt-shipyard is the engine that plans, simulates, and validates
construction — whether in a drydock in Busan or a robotic assembly bay at Earth-Moon L2.
Design Principles
- 100% open source — MIT OR Apache-2.0, no open-core, no proprietary file formats.
- Permissive dependency chain — the crates are
MIT OR Apache-2.0;cargo-denyenforces the allow-list (MIT / Apache-2.0 / BSD / ISC / Zlib / Unicode) and denies copyleft on every PR. - Pure Rust — zero heavy external dependencies in the core crates; compiles to WebAssembly for interactive dashboards.
- Physics you can audit — every solver documents its governing equations and is
verified against analytical cases and golden data (
test-data/golden/).
Documentation
- The Book:
docs/book(mdBook) — runmdbook build docs/bookor read the sources indocs/book/src/. - RFCs:
rfcs/with the process index indocs/rfc/index.md. - API docs:
cargo doc --workspace --open.
Governance
Benevolent Dictator + public RFC process. See GOVERNANCE.md. Releases follow SemVer on a 6-week cadence — see RELEASES.md. Roadmap tracking happens on the public GitHub Projects board linked from the repository.
Security
Please report vulnerabilities privately — see SECURITY.md.
License
Licensed under either of
- MIT license (LICENSE-MIT)
- Apache License, Version 2.0 (LICENSE-APACHE)
at your option.
The "TPT Shipyard" name and logo are trademarks of TPT Solutions — see GOVERNANCE.md.