Amaan Qureshi
dcb7acede4
build: update emscripten version
2024-04-11 22:35:43 -04:00
Amaan Qureshi
abc7910381
refactor(rust): misc fixes & tidying
2024-04-11 22:35:43 -04:00
Amaan Qureshi
5825e24d56
style: wrap comments
2024-04-11 22:35:43 -04:00
Amaan Qureshi
b35efa8f33
style: format imports
2024-04-11 22:35:43 -04:00
Amaan Qureshi
895c7680e7
fix(windows): add /utf-8 flag for parsers using unicode symbols
2024-04-11 09:44:51 -04:00
Amaan Qureshi
99b93d83a1
feat(cli)!: add a separate build command to compile parsers
...
This allows users to build parsers without having to run `test` or
`parse` to invoke the compilation process, and allows them to output the
object file to wherever they like. The `build-wasm` command was merged
into this by just specifying the `--wasm` flag.
2024-03-17 05:36:30 -04:00
Max Brunsfeld
99a720c968
Remove dependency on which crate
2024-03-12 12:19:27 -07:00
Amaan Qureshi
8c4861c186
feat(test): add attributes for corpus tests
2024-02-29 02:17:30 -05:00
ObserverOfTime
502dacf220
refactor: rename TS_REUSE_ALLOCATOR flag
...
TREE_SITTER_REUSE_ALLOCATOR is more consistent
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
Amaan Qureshi
eb35502f06
test: don't use TS_REUSE_ALLOCATOR on Darwin systems
...
For some reason, the linker seems to behave a bit differently with `-exported_symbols_list` on macOS vs other operating systems, so we'll disable this for now
2024-02-26 20:15:36 -05:00
Amaan Qureshi
f1eecf9786
feat: expose the allocator and array header files for external scanners
2024-02-26 09:43:13 -05:00
Max Brunsfeld
29d3583bdf
Use workspace dependencies for internal crates
2024-02-25 11:14:29 -08:00
Amaan Qureshi
068e29c265
build: unify crate versions via workspace
2024-02-24 18:30:04 -05:00
Amaan Qureshi
4408c1570e
fix: publish in the right order now
2024-02-21 15:24:47 -05:00
Amaan Qureshi
a5b7c2a584
fix: publish 0.21.0 to registries
2024-02-21 15:11:37 -05:00
Amaan Qureshi
62578b8c6e
feat(loader): add more commonly used default parser directories
2024-02-21 12:01:25 -05:00
Amaan Qureshi
b40839cd72
style: prefer turbofish syntax where possible
2024-02-19 16:00:50 -05:00
Amaan Qureshi
fd91404ab0
style: tidying
2024-02-19 16:00:50 -05:00
Amaan Qureshi
03c5a8540d
feat: better error info when a scanner is missing required symbols
2024-02-17 00:45:28 -05:00
Amaan Qureshi
6c0643f295
fix: always push the default files if there's no externals
2024-02-16 22:42:40 -05:00
Amaan Qureshi
e32a7f3998
chore: clippy lints
2024-02-16 16:32:07 -05:00
Amaan Qureshi
4342efd57e
feat: allow specifying an external scanner's files
2024-02-16 16:31:56 -05:00
Amaan Qureshi
e996c32108
refactor!: remove the apply-all-captures flag, make last-wins precedence the default
2024-02-16 12:34:12 -05:00
Amaan Qureshi
74812ced1b
chore: deprecate C++ scanners
...
C++ has been a headache to deal with throughout the ecosystem and for
several downstream projects. It is difficult to get working with WASM,
and induces potential issues with compilation on Windows. It has been
proven that writing scanners in C is a much better alternative, and is
the recommended way to write scanners now. C++ support will likely be
removed in 0.21.0
2024-02-14 15:43:53 -05:00
Amaan Qureshi
d80d101e34
build: move common Cargo.toml keys into the workspace and inherit them
2024-02-14 14:56:23 -05:00
Amaan Qureshi
d989b26587
chore: print out full compiler arguments ran when it fails
2024-02-14 13:19:06 -05:00
Amaan Qureshi
a07f988905
refactor: extract regex check into a function and lower its precedence
2024-02-13 03:33:07 -05:00
Bedis Nbiba
7dd096c5f7
feat: implement first-line-regex
2024-02-13 01:51:41 -05:00
Amaan Qureshi
48deb309db
chore(cli): warn users when a query path needed for a subcommand isn't specified in a grammar's package.json
2024-02-12 17:17:37 -05:00
Amaan Qureshi
7233c2f26f
feat: use lockfiles to dedup recompilation
2024-02-12 06:30:36 -05:00
Amaan Qureshi
e6d67ecde0
chore(wasm): use SIDE_MODULE=2 to silence warning
2024-02-11 20:18:30 -05:00
Amaan Qureshi
e4894ac8b4
chore(cli): use spawn to display emcc's stdout and stderr
...
Co-authored-by: Nbiba Bedis <bedisnbiba@gmail.com>
2024-02-09 14:17:34 +01:00
Amaan Qureshi
a969fc428c
chore: move dependencies into the workspace and inherit from there
2024-02-08 15:24:09 -05:00
dundargoc
c8bd6705cf
chore: clippy
2024-02-06 23:34:14 -05:00
Amaan Qureshi
04ff704bca
chore(cli): apply clippy fixes
2024-02-04 04:18:48 -05:00
Amaan Qureshi
1fb16a72ac
chore(loader): apply clippy fixes
2024-02-03 19:38:37 -05:00
Amaan Qureshi
9f2dc9d6b5
fix: rework parser.h includes for test grammars and multi-grammar repos
2024-02-02 10:42:39 -05:00
Max Brunsfeld
1d8975319c
Merge pull request #2840 from tree-sitter/language-reference-count
...
Introduce APIs for managing the lifetimes of languages, allow WASM languages to be deleted
2024-01-30 10:24:37 -08:00
Steven Kalt
d35efd4608
feat(cli): support building WASM via podman
...
Previously, `tree-sitter build-wasm` had the ability to build WASM
by using docker to pull in an image with a complete emscripten toolchain.
This commit adds the ability to use podman to do the same thing.
Using podman requires two notable changes:
1. Using the fully-qualified image name. Docker defaults to prepending
`docker.io` to the image name, but podman does not.
2. Podman will mount the `/src/` volume as belonging to root unless
`--userns=keep-id` is passed. I think podman's different
volume-ownership is related to podman's daemonless execution and
`--uidmap` functionality, but I'm not 100% sure.
To test, I ran
```sh
script/fetch-fixtures
script/generate-fixtures
script/generate-fixtures-wasm # <- the important one!
```
which worked as well as the docker version.
2024-01-29 00:50:32 -05:00
Max Brunsfeld
da16cb1459
Introduce language ref-count management C APIs, remove Copy impl for Language in Rust
2023-12-27 14:59:16 -08:00
Max Brunsfeld
13dd76e444
Return an informative error on failing to construct a WasmStore
2023-11-27 17:48:29 -08:00
Max Brunsfeld
6fd7a1e44e
Return informative error when load_language fails
2023-11-26 12:15:05 -08:00
Max Brunsfeld
473b3c8208
Add a CLI feature flag for wasm runtime support
2023-10-31 16:56:11 -07: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
Amaan Qureshi
cc66895343
perf: cache the current language configuration to lookup later on
2023-09-21 00:52:50 -04:00
Andrew Hlynskyi
52f7eaff31
chore(rust): make Query extra predicates state fully immutable
2023-09-02 23:12:28 +03:00
Amaan Qureshi
dc5ec1cf53
refactor: remove &Option<T> where used
2023-09-01 17:23:39 -04:00
Andrew Hlynskyi
0862921537
doc: Include README as top-level module documentation for all crates
2023-08-28 23:09:37 +03:00