Files
zack3d 31a0b8a485
Multi-Platform CI / test-platforms (ubuntu-22.04) (push) Successful in 18s
Multi-Platform CI / test-platforms (windows-latest) (push) Successful in 18s
Multi-Platform CI / Package for Linux x86_64 (push) Has been skipped
Multi-Platform CI / Package for Windows x86_64 (push) Has been skipped
Multi-Platform CI / Create GitHub Release (push) Has been skipped
feat(ffi): add bloodstream and bladder metrics API
- add C FFI enums MLBladderPhase, MLMetabolicState, MLPerfusionState
- add C FFI structs MLBloodstreamMetrics and MLBladderMetrics
- add ml_patient_bloodstream_metrics and ml_patient_bladder_metrics
  to populate metrics for a patient (mirrored in src/ffi.rs)
- update examples/c/ffi_example.c to print new metrics
- add tests for FFI metrics (tests/ffi.rs)

organ model expansions
- bloodstream: add metrics() snapshot and detailed physiology:
  plasma proteins/oncotic pressure, lymph return, RBC cohort tracking,
  erythropoiesis/clearance with HIF, iron/folate/B12 stores, platelets,
  coagulation/fibrinolysis, immune cell counts, complement, acid–base
- bladder: introduce adaptive compliance, reflex gating, cortical/voluntary
  modulators, safety indices; add metrics(), summary, and unit tests
- brain: add homeostatic drives (respiratory, thirst, hunger, thermo, pain),
  brainstem nuclei (NTS/RVLM/CVLM, nAmb/DMV, RTN), sleep cycle timing,
  cerebrovascular autoregulation; wire drives into autonomic control
- heart: add phase-based cycle (valves and atria), conduction system,
  RAAS regulation, improved coronary perfusion
- intestines: add micronutrient absorption feeding erythropoiesis

patient coupling
- expose Patient::bloodstream_metrics() and ::bladder_metrics()
- integrate new organ signals (kidney osmolality, spleen culling, liver
  proteins) and brain–lung/continence control pathways
- re-export BladderMetrics and BloodstreamMetrics in lib.rs

note
- existing FFI remains compatible; this is a surface addition
- ffi/medicallib.h kept in sync with src/ffi.rs
2025-09-30 02:38:27 -07:00

48 lines
927 B
TOML

[package]
name = "medicallib_rust"
version = "0.3.0"
edition = "2021"
description = "MedicalSim core library rewrite in Rust: basic clinical calculations and types."
authors = ["MedicalSim Team"]
license = "UNLICENSED"
readme = "README.md"
[lib]
crate-type = ["rlib", "cdylib"]
[features]
default = []
serde = ["dep:serde"]
ffi = []
demo-monitor = []
[dependencies]
thiserror = "1"
serde = { version = "1", features = ["derive"], optional = true }
tracing = { version = "0.1", optional = true }
[dev-dependencies]
criterion = { version = "0.5", default-features = false, features = ["cargo_bench_support"] }
tracing-subscriber = { version = "0.3" }
[[example]]
name = "demo_app"
path = "examples/demo_app.rs"
required-features = ["demo-monitor"]
[[bench]]
name = "heart"
harness = false
[profile.release]
lto = true
codegen-units = 1
opt-level = 3
[profile.dev]
opt-level = 1
[build-dependencies]
cbindgen = '0.26'