Port of https://github.com/tscircuit/stepts to MoonBit
Dependencies

async fn main {
let design = @cad.Design::new(name="my-model")
.add(
@cad.Cuboid::new(20, 20, 20)
.with_name("base")
.with_color(@cad.Rgb::orange())
)
.add(
@cad.CalibrationChamferBlock::new(10, 10, 5, chamfer_size_mm=1.0)
.with_name("top-part")
.translate(z=20)
)
design.write_step(Some("model.step"))
}design.write_blender_python(Some("model.py"))blender --background --factory-startup --python model.py./scripts/manage_examples.py all --bpyfn parse_example(step_text : String) -> Unit {
match @parse.parse_repository_from_string_result(step_text) {
@parse.ParseRepositoryResult::Ok(repo) => {
let normalized = repo.to_step_file()
println("entities=" + repo.len().to_string())
println(normalized)
}
@parse.ParseRepositoryResult::Err(info) =>
@cli.eprintln(@parse.format_step_parse_error(info))
}
}$ moon version --all
moon 0.1.20260807 (4da23f8 2026-08-07) ~/.moon/bin/moon
moonc v0.10.7+bc794d341 (2026-08-11) ~/.moon/bin/moonc
moonrun 0.1.20260807 (4da23f8 2026-08-07) ~/.moon/bin/moonrun
pub struct RawEntity {
name : String
args : String
}Port of https://github.com/tscircuit/stepts to MoonBit
Dependencies