Developer Guide

Repository Layout

  • Swift package manifest: Package.swift
  • Rust workspace manifest: Cargo.toml
  • Swift core and CLI: core-swift/Sources/*
  • Rust runtime: core-rust/schrosim-core/*
  • Scripts and baselines: scripts/*, benchmarks/*

Build and Test

swift build
bash scripts/swift-test.sh
cargo test -p schrosim-core

Validation and Performance Gates

bash scripts/cv-validation-suite.sh --runtime both
bash scripts/trace-slo-check.sh --max-gates 512 --max-frame-ms 50

Debugging

See detailed guide:

Contribution and Security Policies

Public Release Process (Current)

Until full automation is added, use this manual flow for public releases:

  1. Preflight checks:
  2. bash scripts/swift-test.sh
  3. cargo test -p schrosim-core
  4. bash scripts/cv-validation-suite.sh --runtime both
  5. Benchmark gates:
  6. bash scripts/trace-slo-check.sh --max-gates 512 --max-frame-ms 50
  7. bash scripts/compute-benchmark.sh --backend gaussian --modes 2 --layers 16 --iterations 2 --compute-backends auto,cpu,metal --max-p95-ms 500
  8. Version updates (if releasing):
  9. Swift CLI version constant in core-swift/Sources/schrosim-cli/main.swift
  10. Rust CLI version constant in core-rust/schrosim-core/src/main.rs
  11. Public-scope hygiene:
  12. ensure enterprise/ private material remains ignored,
  13. ensure README/docs do not depend on enterprise-only assets.
  14. Tag and publish:
  15. create release tag (vX.Y.Z),
  16. publish release notes summarizing API/CLI changes, validation coverage, and known limitations.

When CI/release automation is introduced, this section should be replaced by the workflow file references and required status checks.

Python Package Publishing (PyPI)

  • Python package metadata lives in pyproject.toml.
  • Package source is in src/schrosim/.
  • Build locally:
  • python3 -m pip install --upgrade build twine
  • python3 -m build
  • python3 -m twine check dist/*
  • Publish via GitHub Actions:
  • workflow: .github/workflows/pypi-publish.yml
  • run manually with repository=testpypi first, then repository=pypi.