Amaan Qureshi
28bb2a8c1c
chore(lib): apply clippy fixes
2024-02-04 04:18:59 -05:00
Amaan Qureshi
f4c40f6098
fix: do not install parser.h
2024-02-02 11:30:24 -05:00
Amaan Qureshi
8ab14a0ee5
fix(node): update tests
2024-02-02 11:30:24 -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
Max Brunsfeld
d351f81b4a
Release stale instances from wasm store when languages are dropped
2024-01-29 10:17:49 -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
Marshall Roch
6eacca9606
fix documentation typos
2024-01-25 20:33:15 -05:00
Max Brunsfeld
c4142737ec
Merge branch 'master' into language-reference-count
2024-01-25 12:43:56 -08:00
Amaan Qureshi
98be227227
0.20.9
2024-01-25 15:05:17 -05:00
Max Brunsfeld
3c66dd2d6c
Add missing language return in ts_query_new
...
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Joseph <joseph@zed.dev>
2024-01-25 11:06:54 -08:00
Amaan Qureshi
ef5621c0e2
Merge pull request #2795 from savetheclocktower/fix-quantified-predicates
...
fix: Handle quantified predicates on `web-tree-sitter` properly
2024-01-25 13:31:40 -05:00
Max Brunsfeld
31c4044974
Bump wasmtime to v16 release
2023-12-31 11:33:28 -08:00
Max Brunsfeld
675da7bfe8
Free C error message properly when loading wasm language fails
2023-12-31 10:05:42 -08:00
Max Brunsfeld
4a8e4b1963
Allow wasm languages to be deleted
2023-12-27 15:00:16 -08: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
68ba9a4d66
Grow memory dynamically as-needed when loading wasm language modules
2023-12-03 12:12:47 -08:00
Max Brunsfeld
f2285b43ea
Fix crash when failing to instantiate wasm stdlib module
2023-12-03 11:42:03 -08:00
Max Brunsfeld
09b522ece2
Fix another bug in subtree_compare
...
When subtrees differ, exit loop before pushing children to the stack.
2023-11-30 11:10:33 -08:00
Andrew Hlynskyi
d56b51a11d
Revert "Alt #2454 "
2023-11-29 11:20:05 +02:00
Andrew Dupont
642679f32a
Simplify flags
2023-11-28 14:08:16 -08:00
Andrew Dupont
24e41d2bb7
fix: Handle quantified predicates on web-tree-sitter properly
...
Test cases for all new predicates added in #2532
2023-11-28 13:07:32 -08:00
Max Brunsfeld
034f0d0280
Merge pull request #1864 from tree-sitter/wasm-language
...
Add optional WASM feature to the native library, allowing it to run wasm-compiled parsers via wasmtime
2023-11-28 12:08:47 -08:00
Max Brunsfeld
13dd76e444
Return an informative error on failing to construct a WasmStore
2023-11-27 17:48:29 -08:00
Andrew Hlynskyi
0d26309c41
Revert "chore(lib): fix fields naming in QueryPattern to singular"
2023-11-28 02:30:01 +02:00
Max Brunsfeld
5e2456c2f2
Avoid using recursion for ts_subtree_compare
...
This can lead to stack overflow crashes.
2023-11-27 11:35:33 -08:00
Max Brunsfeld
6fd7a1e44e
Return informative error when load_language fails
2023-11-26 12:15:05 -08:00
Max Brunsfeld
e9289d3b30
Fix error when wrong language name is passed to load_language
2023-11-24 20:25:28 -08:00
Max Brunsfeld
b59716600a
Add a test that loads multiple languages in a wasm store
2023-11-24 20:03:54 -08:00
Max Brunsfeld
359317f876
Determine sizes of static wasm arrays from subsequent static pointers
2023-11-24 11:32:24 -08:00
Max Brunsfeld
97800e0ec8
Advance wasm store's mem + table offsets when adding a language
2023-11-19 12:26:59 -08:00
Amaan Qureshi
0ff28346be
Merge pull request #2714 from MrPrezident/test_point_range_captures_fix
...
fix "test_point_range_captures not working"
2023-11-12 21:09:09 -08:00
MrPrezident
3c4957e940
fix "test_point_range_captures not working"
...
Fix for https://github.com/tree-sitter/py-tree-sitter/issues/105
2023-11-12 20:58:51 -06:00
Max Brunsfeld
098969db08
Fix windows compile errors in wasm.c
2023-11-04 12:26:00 -07:00
Max Brunsfeld
b26eff13e2
Remove code duplication in wasm module instantiation, add stdlib symbols
2023-10-31 15:58:56 -07:00
Max Brunsfeld
0743edd162
Include two more std::string functions in wasm stdlib
2023-10-27 21:54:23 +01:00
Max Brunsfeld
2c0b52eec6
Add a comment about how wasmtime-c-api is linked by cargo
2023-10-27 21:53:31 +01:00
Max Brunsfeld
7715e2477a
Use Box::leak when passing wasm engine to C code
2023-10-27 21:32:28 +01:00
Max Brunsfeld
b23ef57259
Update wasmtime headers, use latest wasmtime C APIs
2023-10-27 21:30:13 +01:00
Max Brunsfeld
ae2f60d907
Fix loading of wasm languages with fields but no aliases
2023-10-27 21:29:23 +01:00
Max Brunsfeld
091652721e
Use upstream wasmtime
2023-10-27 12:43:16 +01:00
Max Brunsfeld
81a1a1733d
Fix C compile warnings in wasm.c
2023-10-27 12:16:05 +01:00
Max Brunsfeld
f4e2f68f14
Merge branch 'master' into wasm-language
2023-10-27 12:11:43 +01:00
Daumantas Kavolis
143ed959c9
Use single if block
2023-10-25 10:47:55 +03:00
Daumantas Kavolis
e265929f90
Fix goto_previous_sibling with padded first children
2023-10-25 10:19:03 +03:00
dstoc
8d0997d5b4
Add towlower to wasm exports
...
tree-sitter/tree-sitter#1906
2023-09-20 10:41:54 +10:00
Amaan Qureshi
6d4aac723f
feat: add some more commonly used functions to exports.json
2023-09-19 09:29:13 -04:00
Andrew Hlynskyi
46965770fc
fix(lib): segmentation fault in ts_node_parse_state
2023-09-12 02:35:22 +03:00
Andrew Hlynskyi
524bf7e2c6
Merge pull request #2607 from ahlinc/fix-zero-deallocs
...
fix: `dealloc` calls on zero pointers
2023-09-03 09:45:52 +03:00
Andrew Hlynskyi
9cc1daafca
chore(ffi): remove enum name prefixes from all C enum values
2023-09-03 07:38:27 +03:00
Andrew Hlynskyi
67a5dbdd93
fix: dealloc calls on zero pointers
2023-09-03 06:53:18 +03:00