rustworkx icon indicating copy to clipboard operation
rustworkx copied to clipboard

Introduce `build.rs` to reduce boilerplate

Open IvanIsCoding opened this issue 1 year ago • 1 comments

Follow up of #1252

Real diff: https://github.com/IvanIsCoding/rustworkx/compare/smarter-boilerplate...IvanIsCoding:rustworkx:build-rs

This PR leverages build.rs to reduce even more the boilerplate required to add a new rustworkx function. All needed now is to add mod your_module; to the main file after adding export_rustworkx_functions! to the new module.

I don't think we can generate multiple mod a; mod b; statments in Rust due to the limitations of include!. Still, I think this is worth keeping to make contributing more straightforward with some "magic".

IvanIsCoding avatar Jul 14 '24 22:07 IvanIsCoding

Pull Request Test Coverage Report for Build 11879773395

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 83 of 84 (98.81%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 95.812%

Changes Missing Coverage Covered Lines Changed/Added Lines %
build.rs 76 77 98.7%
<!-- Total: 83 84
Totals Coverage Status
Change from base Build 11860433299: -0.02%
Covered Lines: 18052
Relevant Lines: 18841

💛 - Coveralls

coveralls avatar Jul 14 '24 23:07 coveralls