Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce build.rs to reduce boilerplate #1253

Open
wants to merge 33 commits into
base: main
Choose a base branch
from

Conversation

IvanIsCoding
Copy link
Collaborator

@IvanIsCoding IvanIsCoding commented Jul 14, 2024

Follow up of #1252

Real diff: IvanIsCoding/rustworkx@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".

@coveralls
Copy link

coveralls commented Jul 14, 2024

Pull Request Test Coverage Report for Build 11862650716

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%
Totals Coverage Status
Change from base Build 11860433299: -0.02%
Covered Lines: 18052
Relevant Lines: 18841

💛 - Coveralls

@IvanIsCoding IvanIsCoding changed the title [WIP] Introduce build.rs to reduce boilerplate Introduce build.rs to reduce boilerplate Jul 15, 2024
@IvanIsCoding IvanIsCoding marked this pull request as ready for review July 15, 2024 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants