[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tree-sitter api
From: |
Tuấn-Anh Nguyễn |
Subject: |
Re: Tree-sitter api |
Date: |
Sat, 4 Sep 2021 19:49:35 +0700 |
On Sat, Sep 4, 2021 at 1:44 PM Yuan Fu <casouri@gmail.com> wrote:
> 1) tree-sitter lacks a way to change its malloc behavior in run-time, I
> commented on their road-map issue, but no one has replied yet,
>
Do you mean APIs to change its alloc/free functions at run time? Why would we
need to do that? Doesn't simply defining `ts_malloc` and related functions work?
See https://github.com/tree-sitter/tree-sitter/blob/v0.20.0/lib/src/alloc.h#L27.
> 4) I need to work on a better way to build and distribute language dynamic
> modules.
>
I think there should be 2 mechanisms:
1. The binaries for common platforms should be built on Emacs's build
infrastructure, and distributed through GNU ELPA.
2. There should be Lisp functions to download the grammar sources and compile
them (by invoking the compiler).
> You can find a script for building dynamic modules at
> https://github.com/casouri/tree-sitter-module
>
I may be missing something here, but the grammars' compiled forms don't need to
be Emacs dynamic modules, right? They only need to be dynamically-loadable
shared libraries.
--
Tuấn-Anh Nguyễn
Software Engineer
- Re: Tree-sitter api, Theodor Thornhill, 2021/09/03
- Re: Tree-sitter api, Yuan Fu, 2021/09/04
- Re: Tree-sitter api,
Tuấn-Anh Nguyễn <=
- Re: Tree-sitter api, Eli Zaretskii, 2021/09/04
- Re: Tree-sitter api, Tuấn-Anh Nguyễn, 2021/09/04
- Re: Tree-sitter api, Eli Zaretskii, 2021/09/04
- Re: Tree-sitter api, Tuấn-Anh Nguyễn, 2021/09/05
- Re: Tree-sitter api, Eli Zaretskii, 2021/09/05
- Re: Tree-sitter api, Yuan Fu, 2021/09/04
- Re: Tree-sitter api, Tuấn-Anh Nguyễn, 2021/09/05
- Re: Tree-sitter api, Yuan Fu, 2021/09/05
- Re: Tree-sitter api, Tuấn-Anh Nguyễn, 2021/09/05
- Re: Tree-sitter api, Yuan Fu, 2021/09/05