Introduce `build.rs` to reduce boilerplate
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".
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.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
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 | |
|---|---|
| Change from base Build 11860433299: | -0.02% |
| Covered Lines: | 18052 |
| Relevant Lines: | 18841 |