Commit graph

69 commits

Author SHA1 Message Date
Antonin Décimo
56c2fe59cb build(make): cleanup include dir on uninstall 2025-07-14 11:02:19 +03:00
Antonin Décimo
c7f877de96 build(make): invoke ln in the link directory 2025-07-14 11:02:19 +03:00
Antonin Décimo
f8f93c1ec1 build(make): fix MinGW builds
Rename libtree-sitter.lib target to libtree-sitter.dll.a which is
what MinGW actually uses, move the target after libtree-sitter.dll,
and make sure it is installed to the correct location.

Also avoid invoking `cc -dumpmachine` multiple times.
2025-07-14 11:02:19 +03:00
Max Brunsfeld
0fdf569571
Reorganize rust crates into a flat crates directory, simplify some CI steps (#4496)
* Move all rust crates (except lib) into crates dir, w/o nesting

* Remove stale path from .gitattributes

* Rename lib.rs files for easier navigation

* Rename mod.rs file for easier navigation

* Fix emscripten-version path

* Fix fixtures dir paths

* Use the default rustfmt settings

* Don't use nightly on CI
2025-06-06 14:25:37 -07:00
Christian Clason
07a1b7fc00 fix(build): bump version to 0.26.0
After a release, `master` branch should be bumped to the next _minor_ version.
2025-03-12 14:52:09 +01:00
WillLillis
1fdd1d250c ci: separate nightly lints to separate job 2025-03-02 16:37:03 -05:00
Antonin Décimo
f0571b1e33
feat: Windows support using MinGW-w64 (#4201)
Building tree-sitter on Windows within a Cygwin or MSYS2 environment
for MinGW-w64 targets should work. As there's no configure-like step,
the tools have to be specified with:

    make CC=x86_64-w64-mingw32-gcc \
         AR=x86_64-w64-mingw32-ar \
         STRIP=x86_64-w64-mingw32-strip

Useful reference:
[How to build and use DLLs on Windows](https://nullprogram.com/blog/2021/05/31/)

This commit doesn't tag public functions with dllexport or
dllimport. This results in exporting non-static functions visible
between translation units, and generating slightly less efficient code
for calling exported functions from the DLL.

This commit doesn't include support to build libtree-sitter with MSVC or
clang-cl, but generates a libtree-sitter.lib file for MSVC/clang-cl
consumers.
2025-02-12 16:31:06 -08:00
Thomas Klausner
60b76c7834 Revert "build: do not define _POSIX_C_SOURCE on NetBSD"
This reverts commit 54921453da.
2025-02-02 17:14:28 -05:00
Thomas Klausner
2bf04d1f04 build: do not define _POSIX_C_SOURCE on NetBSD
It leads to missing symbols, see #4180.
2025-02-02 17:14:28 -05:00
Amaan Qureshi
f5afe475de
build: bump version to 0.25.1 2025-02-02 02:07:36 -05:00
Amaan Qureshi
11410b5a8e ci: add linting step for web-tree-sitter 2025-01-21 12:36:15 -05:00
Riley Bruins
495fe2a6c5
feat: support querying missing nodes
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2024-12-14 14:57:36 -05:00
Amaan Qureshi
42dd32d184 build: remove unicode files and script, move cliff.toml 2024-10-26 23:25:12 +00:00
ObserverOfTime
70c0cba15b build: treat incompatible pointer warning as error 2024-10-19 02:57:08 +00:00
Amaan Qureshi
dbe8bbf480 feat: move scripts to xtasks 2024-10-08 21:07:41 -04:00
Will Lillis
5c6445edea
chore: misc clippy lints 2024-10-06 17:55:00 -04:00
Amaan Qureshi
8943983df6 feat!: properly handle UTF-16 endianness encoding 2024-10-05 21:12:48 -04:00
Amaan Qureshi
cf8ed78a9a feat: bump version to 0.25 2024-10-05 20:23:40 -04:00
Carlo Cabrera
079c69313f
build(make): fix tree-sitter.pc generation (#3745) 2024-10-05 18:27:21 +03:00
Amaan Qureshi
0f5f7710ea build(changelog): prepend to the changelog 2024-10-04 11:38:07 -04:00
Amaan Qureshi
693a403acd 0.24.1 2024-10-04 00:47:45 -04:00
Amaan Qureshi
dfc891a5ce
0.24.0 2024-10-04 00:16:20 -04:00
Firas al-Khalil
4f0d463d49
build(make): support darwin cross-compile 2024-09-17 11:01:54 +03:00
ObserverOfTime
26c1202058 build(lib): build using cmake 2024-09-07 18:38:05 -04:00
Amaan Qureshi
12fb31826b
0.23.0 2024-08-26 09:07:00 -04:00
ObserverOfTime
f9c4cb69ef build(lib): include the minor in the soname 2024-08-25 15:03:13 -04:00
ObserverOfTime
2eeeed0f2a fix(make): fail properly on Windows 2024-08-17 00:51:27 -04:00
Amaan Qureshi
b40f342067
0.22.6 2024-05-05 16:47:18 -04:00
Will Lillis
3a42c27061
ci: add nightly rustfmt to workflow 2024-05-02 02:34:39 -04:00
Max Brunsfeld
cdd4688860 0.22.5 2024-04-14 10:17:04 -07:00
Max Brunsfeld
285257998c 0.22.4 2024-04-12 17:03:02 -07:00
Max Brunsfeld
a3d338781b 0.22.3 2024-04-12 15:10:49 -07:00
Amaan Qureshi
fc15f62133
0.22.2 2024-03-17 07:31:58 -04:00
ObserverOfTime
1ff40f5571 fix(lib): makefile installation 2024-03-12 18:14:58 -04:00
Amaan Qureshi
81d90c7cd8 fix(lib): makefile installation on macOS 2024-03-12 15:53:31 -04:00
Andreas Schneider
d4862ff9f7
build(lib): allow overriding CFLAGS on the commandline
If you package tree-sitter for a distribution, the distribution is
setting the CFLAGS which should be used for all packages.  Allow those
flags to be used.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2024-03-12 01:50:56 -04:00
Amaan Qureshi
1c38d34dea
0.22.1 2024-03-10 17:59:12 -04:00
Amaan Qureshi
0a5a564ea7
0.22.0 2024-03-10 17:15:08 -04:00
Amaan Qureshi
f7c13406c9 build: add uninstall command 2024-02-27 15:54:38 -05:00
ObserverOfTime
799833f9cf build: use c11 everywhere
And improve the makefiles
2024-02-27 15:54:38 -05:00
dundargoc
92690f2d3b build(lint): make lockfile check quiet 2024-02-26 11:00:03 +01:00
dundargoc
f707ab5b53 build(lint): detect if Cargo.lock needs to be updated 2024-02-24 13:54:57 +01:00
dundargoc
f0b315359a build: improve changelog settings
Quality of life improvements:

- automatically use `gh auth token` when running `make changelog`
- Add full links to related pull requests
- Include non-conventional commits
- Force group order by adding html comments
2024-02-23 11:29:18 +01:00
Amaan Qureshi
a5b7c2a584
fix: publish 0.21.0 to registries 2024-02-21 15:11:37 -05:00
dundargoc
48a1f12ca3 build: enable creating changelogs with git-cliff
Introduce a target called `changelog` that will use git-cliff to create
the changelog of the latest release.

Closes https://github.com/tree-sitter/tree-sitter/issues/527.
2024-02-18 11:44:31 +01:00
dundargoc
8759352542 build: add useful development targets to makefile 2024-02-09 13:19:28 +01:00
dundargoc
ff367ebf4c build: enable -pedantic
Co-authored-by: Patrick Thomson <patrickt@github.com>
2024-02-08 16:12:54 +01:00
Max Brunsfeld
f4e2f68f14 Merge branch 'master' into wasm-language 2023-10-27 12:11:43 +01:00
Andrew Hlynskyi
b412d86f19 fix: makefile should install only api.h header 2023-08-26 20:51:52 +03:00
Andrew Hlynskyi
bba9809390 fix: make install BSDs don't have -t option 2023-08-22 16:33:03 +03:00