Builds of https://github.com/acristoffers/tree-sitter-matlab
We use the following subdirectory naming convention:
./matlab-ts-abiNN/YYYYMMDD-SHA1/ARCH/
where
NNis the tree-sitter ABI version. For exampleNN==14for Emacs 30.YYYYMMDDcorresponds to the year, month, day of the https://github.com/acristoffers/tree-sitter-matlab commitSHA1ARCHis from the MATLAB command,computer('arch')where we have:- glnxa64
- GNU/Linux running on x86_64 (
uname -m)Build:
cd ./matlab-ts-abiNN/YYYYMMDD-SHA1/src cc -fPIC -O -c -I. parser.c cc -fPIC -O -c -I. scanner.c cc -fPIC -shared parser.o scanner.o -o ../glnxa64/libtree-sitter-matlab.so - maca64
- MacOS running on arm64 (
uname -m)cd ./matlab-ts-abiNN/YYYYMMDD-SHA1/src cc -fPIC -O -c -I. parser.c cc -fPIC -O -c -I. scanner.c cc -fPIC -shared parser.o scanner.o -o ../maca64/libtree-sitter-matlab.dylib - maci64
- MacOS running on x86_64 (
uname -m). Note MATLAB release, R2025b, is the last release that supports Intel/AMD based MacOS systems.cd ./matlab-ts-abiNN/YYYYMMDD-SHA1/src cc -fPIC -O -c -I. parser.c cc -fPIC -O -c -I. scanner.c cc -fPIC -shared parser.o scanner.o -o ../maci64/libtree-sitter-matlab.dylib - win64
- Microsoft Windows running on Intel/AMD (
echo %PROCESSOR_ARCHITECTURE%is AMD64 in a Command Window)"C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat" cd ./matlab-ts-abiNN/YYYYMMDD-SHA1/src cl /LD /I src\tree_sitter parser.c scanner.c /link /out:..\win64\libtree-sitter-matlab.dll
We are using this convention instead of the tree-sitter-matlab release number to make things more flexible. This convention lets us deploy based on commits rather than release numbers.
We also save the source in a src directory under each build subdirectory.