641114de60
Quick CI / quick-test (push) Failing after 1m15s
Multi-Platform CI / test-platforms (macos-latest, aarch64-apple-darwin) (push) Failing after 56s
Multi-Platform CI / test-platforms (macos-latest, x86_64-apple-darwin) (push) Failing after 40s
Multi-Platform CI / test-platforms (ubuntu-22.04, aarch64-unknown-linux-gnu) (push) Failing after 1m20s
Multi-Platform CI / test-platforms (ubuntu-22.04, x86_64-unknown-linux-gnu) (push) Failing after 40s
Multi-Platform CI / test-platforms (windows-latest, aarch64-pc-windows-msvc) (push) Failing after 40s
Multi-Platform CI / test-platforms (windows-latest, x86_64-pc-windows-msvc) (push) Failing after 39s
Multi-Platform CI / test-native (macos-latest) (push) Failing after 1m16s
Multi-Platform CI / test-native (ubuntu-22.04) (push) Failing after 1m16s
Multi-Platform CI / test-native (windows-latest) (push) Failing after 1m17s
Multi-Platform CI / package (macos-latest, aarch64-apple-darwin) (push) Has been skipped
Multi-Platform CI / package (macos-latest, x86_64-apple-darwin) (push) Has been skipped
Multi-Platform CI / package (ubuntu-22.04, x86_64-unknown-linux-gnu) (push) Has been skipped
Multi-Platform CI / package (windows-latest, x86_64-pc-windows-msvc) (push) Has been skipped
2.4 KiB
2.4 KiB
Repository Guidelines
Project Structure & Module Organization
- Source:
src/(crate rootsrc/lib.rs). Core modules insrc/organs/, types insrc/types.rs, errors insrc/error.rs, FFI insrc/ffi.rs. - Tests: integration tests in
tests/(e.g.,tests/patient.rs). - Examples:
examples/(Rust usage and tracing demos), plus C FFI example inexamples/c/with header inffi/medicallib.h. - Benchmarks:
benches/(Criterion-based; seebenches/heart.rs). - Docs:
README.md,ARCHITECTURE.md,INSTALL.md,MIGRATION.md.
Build, Test, and Development Commands
- Build library (debug):
cargo build - Build with FFI (shared lib):
cargo build --release --features ffi - Run tests:
cargo test(single test file:cargo test --test patient) - Run examples:
cargo run --example usage(ortracing_demo) - Benchmarks (Criterion):
cargo bench - Lint:
cargo clippy --all-targets -- -D warnings - Format:
cargo fmt --all - Docs (open):
cargo doc --no-deps --open
Coding Style & Naming Conventions
- Rust style via
rustfmt; 4-space indentation; wrap at ~100 cols where reasonable. - Naming: modules/files
snake_case, types/traitsCamelCase, functions/varssnake_case, constantsSCREAMING_SNAKE_CASE. - Public API changes must be intentional; update examples and docs when modifying
src/ffi.rsorsrc/organs/*.
Testing Guidelines
- Prefer integration tests in
tests/named after features (e.g.,basic.rs,ffi.rs). - Add unit tests near code under
#[cfg(test)]for small invariants. - Keep tests deterministic; avoid sleeping/time unless necessary.
- Run
cargo testlocally and ensurecargo clippypasses before opening a PR.
Commit & Pull Request Guidelines
- Commits: clear, imperative subject (e.g., "Add heart rate update clamp"). Conventional Commits (feat/fix/refactor/docs/test) are welcome.
- PRs: concise description, link issues, note breaking changes, and include tests or examples. Add screenshots only if relevant to docs.
Security & FFI Notes
- FFI: when changing
src/ffi.rs, update C headerffi/medicallib.hand verifyexamples/c/ffi_example.cstill builds against the producedcdylib. - Avoid
unsafeunless essential; document safety contracts.
Agent-Specific Tips
- Maintain module organization under
src/organs/and keep APIs cohesive. - Do not introduce new runtime dependencies without discussion; prefer standard library and existing crates.