Commit graph

22 commits

Author SHA1 Message Date
Lucas Marçal
28d5272e71 build(swift): include all source files 2025-01-06 01:13:04 -05:00
Max Brunsfeld
201b41cf11
feat: add 'reserved word' construct
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2024-12-23 03:06:32 -05:00
Max Brunsfeld
0fc92c9a7d Add strncat to wasm stdlib
Co-authored-by: Marshall <marshall@zed.dev>
2024-03-25 09:51:54 -07:00
Max Brunsfeld
8945e3a111 Fix sorting of wasm stdlib symbols 2024-03-20 18:23:44 -07:00
Max Brunsfeld
f415f0c6f2 Add strncmp to wasm stdlib 2024-03-20 15:49:47 -07:00
Max Brunsfeld
7a9b3076ef Handle memory errors occurring in wasm scanners
* In WASM, use a custom, simple malloc implementation that lets us
  expicitly reset the heap with a new start location.
* When a WASM call traps or errors, propagate that as a parse failure.
* Reset the WASM heap after every parse.

Co-authored-by: Conrad <conrad@zed.dev>
2024-03-17 10:19:42 -07:00
Max Brunsfeld
dfc6d93bae Rename wasm C sources to avoid conflicts with standard wasm headers
Co-authored-by: Marshall <marshall@zed.dev>
2024-02-26 13:08:30 -08:00
Max Brunsfeld
b40a42ac0f Remove vendored wasmtime headers
When building rust binding, use wasmtime headers provided via cargo
by the wasmtime-c-api crate.

Co-authored-by: Marshall <marshall@zed.dev>
2024-02-26 10:48:58 -08:00
Amaan Qureshi
697e318a6c fix(wasm): remove C++ mangled symbols
No more upstream scanners use C++ so we're going to encourage to prefer
using C instead. It is just much easier to work with overall
2024-02-09 06:58:56 -05:00
dundargoc
df1fe842eb docs: various fixes
Closes https://github.com/tree-sitter/tree-sitter/issues/1317.
Closes https://github.com/tree-sitter/tree-sitter/issues/1752.
Closes https://github.com/tree-sitter/tree-sitter/issues/2439.

Co-authored-by: Simon Hengel <sol@typeful.net>
Co-authored-by: Akash Yadav <itsaky01@gmail.com>
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: Laytan Laats <laytanlaats@hotmail.com>
2024-02-08 00:08:59 +01:00
Max Brunsfeld
63f34236e3 Add iswxdigit to wasm stdlib 2024-02-05 10:20:27 -08:00
Max Brunsfeld
f383b02741 Add iswblank wasm stdlib function 2024-02-02 12:04:49 -08:00
Max Brunsfeld
e21d9e7f93 Avoid duplication of list wasm stdlib symbol list 2024-02-02 12:00:08 -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
6fd7a1e44e Return informative error when load_language fails 2023-11-26 12:15:05 -08: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
b23ef57259 Update wasmtime headers, use latest wasmtime C APIs 2023-10-27 21:30:13 +01:00
Max Brunsfeld
6d34e5cb5c Refactor storage of wasm stdlib function indices 2023-01-23 15:19:42 -08:00
Max Brunsfeld
98ccfcffb0 Provide minimal C/C++ std library to wasm external scanners 2022-11-15 17:14:33 -08:00
Max Brunsfeld
042e6f9d57 Restucture wasm module, return a normal TSLanguage from load_language 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