eb63ffc7db79a8ee815cf8ae96b6a3a61856f90f
Quick CI / quick-test (push) Failing after 1m14s
Multi-Platform CI / test-platforms (macos-latest, aarch64-apple-darwin) (push) Failing after 39s
Multi-Platform CI / test-platforms (macos-latest, x86_64-apple-darwin) (push) Failing after 38s
Multi-Platform CI / test-platforms (ubuntu-22.04, aarch64-unknown-linux-gnu) (push) Failing after 44s
Multi-Platform CI / test-platforms (ubuntu-22.04, x86_64-unknown-linux-gnu) (push) Failing after 39s
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 1m14s
Multi-Platform CI / test-native (windows-latest) (push) Failing after 1m15s
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, aarch64-unknown-linux-gnu) (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
medicallib_rust
MedicalSim core library rewrite in Rust.
- Safe, minimal API for medical simulation primitives
- Optional
serdefeature for serialization - Optional
ffifeature to expose a stable C ABI (cdylib)
Build
- Build:
cargo build(tests:cargo test) - FFI build:
cargo build --features ffi --release - Format/Lint:
cargo fmt --allandcargo clippy -D warnings
Examples
- Rust:
cargo run --example usageandcargo run --example patient - C FFI: see
examples/c/ffi_example.c, header inffi/medicallib.h
FFI ABI
- Opaque
MLPatienthandle - Functions:
medicallib_bmi,ml_patient_new/free/update,ml_patient_summary,ml_patient_organ_summary - All allocated strings must be freed with
ml_string_free
Version Matrix
- Rust 1.70+ (Edition 2021)
- OS: Linux, macOS, Windows (see GitHub Actions CI)
Docs
- Architecture:
ARCHITECTURE.md - Migration (C++ -> Rust):
MIGRATION.md - C/C++ install:
INSTALL.md
Packaging (binary distribution)
- Linux/macOS: run
../scripts/package.sh [target-triple]frommedicallib_rust/(ormake package). - Windows: run
..\scripts\package.ps1 [target-triple]frommedicallib_rust\. - Artifacts are placed in
medicallib_rust/dist/as both.tar.gz(Unix) and.zip.
CI: GitHub + Gitea
- GitHub Actions workflow:
.github/workflows/ci.yml - Gitea Actions workflow:
.gitea/workflows/ci.yml
Description