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

feat: optionally generate Rust bindings during build process #2540

Merged
merged 2 commits into from
Aug 21, 2023
Merged

feat: optionally generate Rust bindings during build process #2540

merged 2 commits into from
Aug 21, 2023

Conversation

ahlinc
Copy link
Contributor

@ahlinc ahlinc commented Aug 20, 2023


Motivation

This is required for a future work on making C lib to have an optional feature to have zero dependencies even from libc and to resolve issues with wasm32-unknown-unknown target for a Rust binding -> C lib use case on the wasm32-unknown-unknown target.

The bindgen dependency is optional and it can be used as:

cargo build -p tree-sitter -F bindgen

Because all optional dependencies automatically become features with the same names.

lib/binding_rust/build.rs Outdated Show resolved Hide resolved
lib/binding_rust/build.rs Outdated Show resolved Hide resolved
lib/binding_rust/build.rs Outdated Show resolved Hide resolved
lib/binding_rust/bindings.rs Show resolved Hide resolved
@ahlinc ahlinc changed the title feat: generate Rust bindings during build process feat: optionally generate Rust bindings during build process Aug 21, 2023
@ahlinc ahlinc merged commit 023e0f2 into tree-sitter:master Aug 21, 2023
32 checks passed
@ahlinc ahlinc deleted the build-bindgen branch August 21, 2023 01:01
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.

None yet

2 participants