Skip to content

Add IniBuilder #442

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add IniBuilder #442

wants to merge 2 commits into from

Conversation

Qard
Copy link
Contributor

@Qard Qard commented Jun 11, 2025

This might only be useful in combination with the embed feature so it may make sense to gate this behind that feature, but it doesn't depend on it in any way--it can exist without it. I left the feature-gating out, but I could change that if you prefer.

Copy link
Collaborator

@Xenira Xenira left a comment

Choose a reason for hiding this comment

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

Haven't had a detailed look yet. But looks good.

I think we can keep it without a feature guard for now.

@Xenira
Copy link
Collaborator

Xenira commented Jun 11, 2025

Would you mind adding documentation in the /guide?

And thanks again for contributing!

@Qard
Copy link
Contributor Author

Qard commented Jun 11, 2025

Yep, I can add a guide for that. Where do you think it should go?

@Qard Qard force-pushed the ini-builder branch 6 times, most recently from c43e8b6 to 7862694 Compare June 13, 2025 08:46
@Qard Qard force-pushed the ini-builder branch 2 times, most recently from 08634cb to 6e2c008 Compare June 13, 2025 08:59
@Qard
Copy link
Contributor Author

Qard commented Jun 13, 2025

Seems the ini builder API didn't exist until 8.2. I've added compile gates to builders/mod.rs, but I'm not sure how to do the equivalent for the header include in the wrapper.h file. 🤔

@Xenira
Copy link
Collaborator

Xenira commented Jun 13, 2025

Seems the ini builder API didn't exist until 8.2. I've added compile gates to builders/mod.rs, but I'm not sure how to do the equivalent for the header include in the wrapper.h file. 🤔

Guess you could pass that in here:

build.define(var, *val);

See windows build:

let mut defines = vec![

@Qard Qard force-pushed the ini-builder branch 3 times, most recently from af9e073 to 9d8436f Compare June 14, 2025 15:42
@Qard
Copy link
Contributor Author

Qard commented Jun 14, 2025

I did some restructuring of the build file to include an ApiVersion enum which can be used for managing both the cfg flag names and C define names in the stacked form it was using before, so we can do EXT_PHP_RS_PHP_82 to gate C which depends on 8.2 minimum. 🙂

@Qard Qard force-pushed the ini-builder branch 5 times, most recently from 5d7b961 to 47b170d Compare June 14, 2025 16:21
@Qard Qard force-pushed the ini-builder branch 3 times, most recently from 5334031 to 7a0495c Compare June 14, 2025 16:52
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.

2 participants