Skip to content

refactor: Remove AOT as backend - #343

Open
mhovd wants to merge 3 commits into
mainfrom
remove-aot
Open

refactor: Remove AOT as backend#343
mhovd wants to merge 3 commits into
mainfrom
remove-aot

Conversation

@mhovd

@mhovd mhovd commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Most users will just compile their binary with pharmsol as a dependency, instead of using this AOT

Copilot AI lite review requested due to automatic review settings August 18, 2026 18:29
@codecov-commenter

codecov-commenter commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.05%. Comparing base (0e40a55) to head (4d8183c).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #343      +/-   ##
==========================================
+ Coverage   83.82%   84.05%   +0.23%     
==========================================
  Files          82       78       -4     
  Lines       33983    32536    -1447     
==========================================
- Hits        28486    27348    -1138     
+ Misses       5497     5188     -309     
Files with missing lines Coverage Δ
src/dsl/native.rs 67.02% <ø> (-0.31%) ⬇️
src/dsl/runtime.rs 92.64% <100.00%> (-1.21%) ⬇️
src/lib.rs 100.00% <ø> (ø)
src/parameters.rs 91.00% <ø> (ø)
src/simulator/equation/ode/mod.rs 87.86% <ø> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the native ahead-of-time (AoT) DSL backend from pharmsol, consolidating the runtime compilation surface around the in-process JIT workflow and deleting the associated AoT build/export/load implementation and test matrix.

Changes:

  • Removed AoT features (dsl-aot, dsl-aot-load), AoT dependencies, and AoT-related modules (aot, compiled ABI glue, rust backend emitter, build support).
  • Simplified runtime APIs, tests, and benchmarks to only exercise RuntimeCompilationTarget::Jit / RuntimeBackend::Jit.
  • Updated docs and CI configuration to reflect the JIT-only runtime target surface.

Reviewed changes

Copilot reviewed 21 out of 22 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/support/runtime_corpus.rs Drops AoT workspace + AoT compilation helpers; gates support on dsl-jit only.
tests/support/bimodal_ke.rs Removes AoT compilation helpers and workspace; narrows runtime helpers to dsl-jit.
tests/runtime_backend_matrix.rs Removes AoT rows from the backend matrix tests; now JIT-only.
tests/full_feature_dsl_backend_parity.rs Removes JIT↔AoT parity assertions; now validates JIT vs reference only.
tests/bimodal_ke_entrypoint_matrix.rs Removes AoT entrypoints from the test matrix; now JIT-only.
src/simulator/equation/ode/mod.rs Narrows closure_helpers exposure to dsl-jit only.
src/parameters.rs Narrows runtime-model parameter ordering impls/imports to dsl-jit only.
src/lib.rs Removes AoT feature documentation and the build_support module hook.
src/dsl/rust_backend.rs Deletes the Rust source emitter used for AoT artifacts.
src/dsl/runtime.rs Removes AoT targets/artifact loading from runtime surface; updates unit tests accordingly.
src/dsl/native.rs Removes native library-backed artifact ownership and NativeAot backend variant.
src/dsl/mod.rs Removes AoT modules/exports and re-exports; narrows runtime/native modules to dsl-jit.
src/dsl/compiled_backend_abi.rs Deletes the ABI constants/JSON envelope logic used for AoT artifacts.
src/dsl/aot.rs Deletes AoT compile/export/load implementation and associated tests.
src/build_support.rs Deletes the cargo/rustup build scaffolding used by AoT compilation.
README.md Updates DSL/runtime documentation to describe only the JIT workflow.
pharmsol-dsl/src/lib.rs Updates crate docs to reflect execution being JIT-consumed (no AoT backend).
pharmsol-dsl/README.md Removes AoT workflow mentions from the DSL crate README.
Cargo.toml Removes AoT features/deps; updates bench required-features to dsl-jit only.
benches/dsl_matrix.rs Removes AoT backend from the benchmark matrix and related workspace handling.
.gitignore Removes ignores for .pkm artifacts and a removed tests/browser-e2e/node_modules/ path.
.github/workflows/build.yml Removes AoT smoke-target install/env wiring; keeps test matrix otherwise.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/dsl/runtime.rs
Comment on lines 643 to +648
let jit_values = subject_values(
&jit.estimate_predictions(&subject, &support)
.expect("jit predictions"),
);
let aot_values = subject_values(
&aot.estimate_predictions(&subject, &support)
.expect("aot predictions"),
);

for (jit_value, aot_value) in jit_values.iter().zip(aot_values.iter()) {
assert_relative_eq!(jit_value, aot_value, max_relative = 1e-4);
}
assert_eq!(jit_values.len(), 6);
assert!(jit_values.iter().all(|value| value.is_finite()));
@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpharmsol
Branchremove-aot
Testbedmhovd-pgx

⚠️ WARNING: Truncated view!

The full continuous benchmarking report exceeds the maximum length allowed on this platform.

🚨 3 Alerts

🐰 View full continuous benchmarking report in Bencher

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants