Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

matlab-ts-bin/README.org

Builds of https://github.com/acristoffers/tree-sitter-matlab

We use the following subdirectory naming convention:

./matlab-ts-abiNN/YYYYMMDD-SHA1/ARCH/

where

  • NN is the tree-sitter ABI version. For example NN==14 for Emacs 30.
  • YYYYMMDD corresponds to the year, month, day of the https://github.com/acristoffers/tree-sitter-matlab commit SHA1
  • ARCH is 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.