script/generate-bindings - no derived Copy, Clone for ptr data wrappers
This commit is contained in:
parent
130080ff2e
commit
a2bcc4f448
1 changed files with 14 additions and 0 deletions
|
|
@ -2,12 +2,26 @@
|
|||
|
||||
output_path=lib/binding_rust/bindings.rs
|
||||
header_path='lib/include/tree_sitter/api.h'
|
||||
no_derive_copy=(
|
||||
TSInput
|
||||
TSLanguage
|
||||
TSLogger
|
||||
TSParser
|
||||
TSTree
|
||||
TSQuery
|
||||
TSQueryCursor
|
||||
TSQueryCapture
|
||||
TSQueryMatch
|
||||
TSQueryPredicateStep
|
||||
)
|
||||
no_copy=$(IFS='|'; echo "${no_derive_copy[*]}")
|
||||
|
||||
bindgen \
|
||||
--no-layout-tests \
|
||||
--allowlist-type '^TS.*' \
|
||||
--allowlist-function '^ts_.*' \
|
||||
--blocklist-type '^__.*' \
|
||||
--no-copy "$no_copy" \
|
||||
$header_path > $output_path
|
||||
|
||||
echo "" >> $output_path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue