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

Easier onboarding of projects that have custom header file? #430

Open
kornelski opened this issue Dec 5, 2024 · 3 comments
Open

Easier onboarding of projects that have custom header file? #430

kornelski opened this issue Dec 5, 2024 · 3 comments
Labels
D-Hard A task that takes serveral days to complete enhancement New feature or request help wanted Extra attention is needed

Comments

@kornelski
Copy link

cargo-c by default wants to generate a header using cbindgen. The note about generate = false in the readme is easy to overlook.

Could cargo-c be smart about this, and try to detect presence of a hand-made header (*.h or include/*.h), and instruct user to add appropriate bits to Cargo.toml?

@lu-zero
Copy link
Owner

lu-zero commented Dec 5, 2024

Adding an init command that looks for .h and acts accordingly (populate a cbindgen.toml or add generate = false and add the .h in the metadata if they are in a custom place?

@kornelski
Copy link
Author

Yes, that could work.

I've noticed that it already creates cbindgen config automatically. Maybe if there's no cbindgen config, it should search for .h files, and warn or ask or skip cbindgen if headers are found?

@lu-zero lu-zero added enhancement New feature or request help wanted Extra attention is needed D-Hard A task that takes serveral days to complete labels Dec 6, 2024
@lu-zero
Copy link
Owner

lu-zero commented Dec 6, 2024

right now there is no init command, getting it nice might time a bit of time and quite a bit of toml-edit ^^;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D-Hard A task that takes serveral days to complete enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants