Commit graph

59 commits

Author SHA1 Message Date
dependabot[bot]
3d849cb40e
build(deps): bump bindgen from 0.66.1 to 0.69.4
Bumps [bindgen](https://github.com/rust-lang/rust-bindgen) from 0.66.1 to 0.69.4.
- [Release notes](https://github.com/rust-lang/rust-bindgen/releases)
- [Changelog](https://github.com/rust-lang/rust-bindgen/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/rust-bindgen/compare/v0.66.1...v0.69.4)

---
updated-dependencies:
- dependency-name: bindgen
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-05 20:16:49 -05:00
Douglas Creager
44aa80d678
feat: include build script links in Rust bindings
This patch updates the Rust binding's build script to output [build
metadata][links].  This makes it easier for downstream crates to
determine the include path, in case they need to compile their own C
code that requires the tree-sitter headers.

[links]: https://doc.rust-lang.org/cargo/reference/build-scripts.html#the-links-manifest-key
2024-02-05 20:05:05 -05:00
Amaan Qureshi
f4c40f6098
fix: do not install parser.h 2024-02-02 11:30:24 -05:00
Max Brunsfeld
31c4044974 Bump wasmtime to v16 release 2023-12-31 11:33:28 -08:00
Max Brunsfeld
091652721e Use upstream wasmtime 2023-10-27 12:43:16 +01:00
Max Brunsfeld
f4e2f68f14 Merge branch 'master' into wasm-language 2023-10-27 12:11:43 +01:00
Andrew Hlynskyi
4278e03b11 feat: generate Rust bindings during build process
It can be used as:
  > cargo build -p tree-sitter -F bindgen
2023-08-21 02:56:14 +03:00
Andrew Hlynskyi
f0fde974e4 Remove lazy_static lib dep forgotten in 622359b4 2023-08-12 00:10:35 +03:00
Amaan Qureshi
56cedba4bf
chore: bump dependencies 2023-07-19 03:18:17 -04:00
Andrew Hlynskyi
da894afef5 cargo: specify minimum supported Rust version 2023-04-04 03:42:55 +03:00
Max Brunsfeld
811bc8256d lib: 0.20.10 2023-03-13 12:21:19 -07:00
Max Brunsfeld
bd63fb2a0d Tweak query tests 2023-02-16 11:59:34 -08:00
Max Brunsfeld
08ccf5babf Disable most wasmtime features 2022-11-15 17:14:33 -08:00
Max Brunsfeld
7eb3e504db Use my fork of wasmtime temporarily 2022-11-15 17:14:33 -08:00
Max Brunsfeld
3f1a7f9cd4 Start work on ability to load wasm languages from native lib, via wasmtime 2022-11-15 17:14:33 -08:00
Max Brunsfeld
2be51abcd8 Bump library versions 2022-09-02 15:00:09 -07:00
Max Brunsfeld
01df16ca9f lib: 0.20.8 2022-06-27 15:07:40 -07:00
Max Brunsfeld
db91399ea7 lib: 0.20.7 2022-06-22 16:03:21 -07:00
Max Brunsfeld
1b2e90f647 libs: 0.20.6 2022-03-02 20:50:29 -08:00
Max Brunsfeld
fcbef45899 libs: 0.20.5 2022-03-02 14:43:16 -08:00
Max Brunsfeld
5ef4ef4e2e lib: 0.20.4 2022-02-04 13:13:21 -08:00
Max Brunsfeld
fab8540508 libs: 0.20.3 2022-01-21 16:35:37 -08:00
Max Brunsfeld
f010781efa lib: 0.20.2 2021-12-30 16:35:21 -08:00
Max Brunsfeld
622359b400 Simplify allocation-recording in test suite using new ts_set_allocator API 2021-12-30 16:09:07 -08:00
Max Brunsfeld
42360fc003 Bump library versions to 0.20.1 2021-11-21 12:33:12 -08:00
Max Brunsfeld
be69777350 libs: 0.20.0 2021-06-29 17:18:22 -07:00
Max Brunsfeld
5664b77535 rust: 0.19.5 2021-05-20 14:29:25 -07:00
Max Brunsfeld
5f313689f0 rust: 0.19.4 2021-03-18 10:36:05 -07:00
Max Brunsfeld
48fa4bdb00 rust: 0.19.3 2021-03-12 15:21:47 -08:00
Max Brunsfeld
841e160898 rust libs: 0.19.2 2021-03-08 10:03:45 -08:00
Max Brunsfeld
0818892a1a libs: 0.19.1 2021-03-05 15:31:48 -08:00
Max Brunsfeld
22fb88e89d Bump library versions to 0.19 2021-03-01 14:46:43 -08:00
hvithrafn
05f79f0f90 Update dependencies; fix breakage 2021-02-26 10:55:20 -07:00
Douglas Creager
a29c8d9264 Move allocation tracking into lib crate
We have several test cases defined in the `cli` crate that depend on the
`lib` crate's `allocation-tracking` feature.  The implementation of the
actual allocation tracker used to live in the `cli` crate, close to the
test cases that use it.  The `allocation-tracking` feature in the `lib`
crate was just used to tell the tree-sitter implementation to expect
that the allocation tracker exists, and to use it.

That pattern meant that we had a circular dependency: `cli` depends on
`lib`, but `lib` required some code that was implemented in `cli`.
That, in turn, caused linker errors — but only when compiling in certain
configurations! [1]

This patch moves all of the allocation tracking implementation into the
`lib` crate, gated on the existing `allocation-tracking` feature, which
fixes the circular dependency.

Note that this patch does **not** fix the fact that feature unification
causes the `lib` crate to be built with the `allocation-tracking`
feature enabled, even though it's not a default.  Fixing that depends on
the forthcoming version 2 feature resolver [2], or using the `dev_dep`
workaround [3] in the meantime.

[1] https://github.com/tree-sitter/tree-sitter/issues/919
[2] https://doc.rust-lang.org/nightly/cargo/reference/features.html#feature-resolver-version-2
[3] https://github.com/tree-sitter/tree-sitter/issues/919#issuecomment-777107086
2021-02-23 09:16:37 -05:00
Max Brunsfeld
6dbe6a3a90 Merge branch 'master' into actions-ci 2021-02-05 10:19:05 -08:00
Kája Lišková
915834c113 Update CC to version with better target support
This is just a minimal set of changes to dependencies.
macOS aarch64 support was only introduced in `cc` version 1.0.58, so this now allows tree-sitter to build natively on M1 computers
2020-12-20 16:09:17 -06:00
Max Brunsfeld
b661050a61 Simplify setup for enabling/disabling allocation recording in the C lib 2020-12-02 15:35:13 -08:00
Max Brunsfeld
281e75d74d rust binding: 0.17.1 2020-11-02 20:53:08 -08:00
Max Brunsfeld
08356f79c7 Bump sibling cargo deps 2020-09-30 21:19:32 -07:00
Max Brunsfeld
7361cf9a0b rust binding: 0.17.0 2020-09-24 15:05:34 -07:00
Max Brunsfeld
c31afbb86a lib: 0.16.1 2020-06-01 13:45:54 -07:00
Max Brunsfeld
392f023e59 rust: 0.16.0 2020-05-12 16:21:56 -07:00
Max Brunsfeld
f453178ca2 rust: Remove unnecessary dependencies from core library 2020-03-16 14:46:05 -07:00
Max Brunsfeld
078cab3f96 rust: 0.6.3 2020-03-02 15:02:45 -08:00
Max Brunsfeld
1217f58b8d rust: 0.6.2 2020-02-17 22:37:12 -08:00
Max Brunsfeld
2bc7e457df lib: 0.6.1 2020-01-28 09:27:10 -08:00
Max Brunsfeld
80a4304956 lib: 0.6.0 2019-12-10 16:24:39 -08:00
Max Brunsfeld
78f800935e binding_rust: 0.5.0 2019-11-08 14:22:01 -08:00
Max Brunsfeld
662af0afc1 binding_rust: 0.4.0 2019-11-08 12:30:58 -08:00
Matthew Krupcale
ee9a3c0ebb lib: remove utf8proc dependency (#436)
* Remove dependency on utf8proc

This removes the only external dependency on utf8proc for UTF-8 decoding. It does so by implementing its own UTF-8 decoder. This decoder is both faster and has a simpler API.

 * .gitmodules: remove utf8proc submodule
 * docs/section-2-using-parsers.md: remove requirement for utf8proc submodule
 * docs/section-6-contributing.md: likewise
 * lib/Cargo.toml: remove utf8proc subdirectory package include
 * lib/README.md: remove utf8proc subdirectory description
 * lib/binding_rust/build.rs: remove utf8proc compiler include directory
 * lib/src/lexer.c: remove utf8proc dependencies and types
 * lib/src/lib.c: remove utf8proc dependency
 * lib/src/unicode.h: define types for Unicode decoders
 * lib/src/utf16.{c,h}: implement more readable UTF-16 decoder
 * lib/src/utf8.{c,h}: implement fast UTF-8 decoder
 * lib/utf8proc: remove utf8proc submodule directory
 * script/build-lib: remove utf8proc compiler include directory
 * script/build-wasm: likewise

* Optimize ts_lexer__get_lookahead.

Try to favor non-failure code path and assign lookahead values directly to lexer

 * lib/src/lexer.c: optimize for non-failure code path

* Fix some compiler errors

 * lib/src/lexer.c: cast from signed to unsigned for decode_next result
 * lib/src/utf16.c: fix non-constant initializers for older compilers

* Remove some missed remnants of utf8proc

 * docs/section-2-using-parsers.md: only two include paths necessary now
 * lib/src/lib.c: no need to define UTF8PROC_STATIC

* Use ICU's utf8 and utf16 decoding routines

* Remove unnecessary casts when calling icu macros

* Check buffer length before attempting to decode a unicode character

* Use new unicode function when parsing Queries

Co-Authored-By: Matthew Krupcale <mkrupcale@matthewkrupcale.com>

* Mark libicu files as vendored for GitHub's stats
2019-10-14 11:18:39 -07:00