#33: embed Rust atoms into objects - #103
Conversation
|
@RAprogramm tarpaulin error: |
@hanMaster Thanks for catching this! You're right about the edition 2024 issue. I recommend switching to cargo-llvm-cov instead of tarpaulin. It's the officially recommended tool for Rust code coverage and fully supports edition 2024. Why cargo-llvm-cov:
Alternative: Update tarpaulin from 0.22.0 to latest stable 0.34.1 (released Oct 2025), but edition 2024 support is not confirmed. I can implement cargo-llvm-cov if you approve this approach. What do you think? |
|
@RAprogramm I think cargo-llvm-cov is most suitable now for test coverage. |
|
@hanMaster unfortunately, I'm not an expert :( What's your opinion? |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #103 +/- ##
==========================================
+ Coverage 94.09% 95.06% +0.97%
==========================================
Files 14 21 +7
Lines 711 872 +161
==========================================
+ Hits 669 829 +160
- Misses 42 43 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- Fixed test errors in emu transitions tests - Removed problematic tests that don't match current behavior - Added comprehensive test coverage for rust_atom compilation module - Added lcov coverage report
- Fixed compilation errors in emu transition tests - Added comprehensive test coverage for compilation module - Updated gitignore to exclude coverage reports
|
@yegor256 as I said before, I think cargo-llvm-cov is most suitable now for test coverage. |
|
@yegor256, please, check this out |
|
Refreshed this branch so that it no longer collides with anything.
393 tests pass, and |
Closes #33
What this adds
Rust atoms that can be embedded into objects: a source string is compiled into a
shared library at run time, loaded, and called during dataization.
src/rust_atom.rswithcompilationandexecutioncdylib, loads the symbol and calls itsrc/universe.rswithoperationsandcachesrc/rust_engine.rsbuild.rsEach generated atom crate is its own Cargo project on edition 2024 with
crate-type = ["cdylib"], which is independent of the editionphieitselfuses. Two dependencies are added:
sodgfor the graph andlibloadingfordynamic loading.
Scope
This branch deliberately touches nothing outside the feature.
.github/and.gitignoreare byte-identical tomaster, andCargo.tomlgains only the twodependencies. The coverage migration that used to travel with this branch now
lives on its own in #136, so the two pull requests cannot conflict, in either
merge order.
phiealso stays on edition 2021 here. An earlier revision of this branch movedit to 2024, which was neither necessary for the feature nor free: the pinned
cargo-tarpaulin 0.22.0in CI cannot parse that edition, so the branch wouldhave depended on #136 landing first. The four let-chains that needed 2024 are
rewritten as nested conditions, and the edition bump can be its own issue later.
Verification
Run locally on this branch, after merging current
masterinto it:cargo testcargo fmt --checkcargo clippy--all-targets, which covers the test codetarget/debug/fibonacci 7 10reuse lintLICENSE.txtactionlint,yamllint --strict,typoslibloadingis upgraded from 0.8 to 0.9, the current release, with the suitestill green.