Page MenuHomeSoftware Heritage

base-buster: Install emscripten required by swh-search

Authored by anlambert on Fri, Jul 16, 4:50 PM.



This seems sufficient to build the tree-sitter WASM module for the
swh-search search language parser.

I managed to build the WASM module for the tree-sitter Python parser
so I guess this should work too for the swh search language parser.

(swh) ✔ ~/swh/swh-jenkins-dockerfiles/base-buster [master|✚ 1] 
16:41 $ docker run -it swh-jenkins/base-buster /bin/bash
jenkins@26e3c3b4ea73:~$ yarn add tree-sitter-cli
yarn add v1.22.5
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
└─ tree-sitter-cli@0.20.0
info All dependencies
└─ tree-sitter-cli@0.20.0
Done in 1.03s.
jenkins@26e3c3b4ea73:~$ export PATH=~/node_modules/.bin/:$PATH
jenkins@26e3c3b4ea73:~$ git clone
Cloning into 'tree-sitter-python'...
remote: Enumerating objects: 2375, done.
remote: Counting objects: 100% (119/119), done.
remote: Compressing objects: 100% (81/81), done.
remote: Total 2375 (delta 60), reused 81 (delta 31), pack-reused 2256
Receiving objects: 100% (2375/2375), 18.26 MiB | 26.71 MiB/s, done.
Resolving deltas: 100% (1489/1489), done.
jenkins@26e3c3b4ea73:~$ cd tree-sitter-python/
jenkins@26e3c3b4ea73:~/tree-sitter-python$ tree-sitter build-wasm
jenkins@26e3c3b4ea73:~/tree-sitter-python$ git status
On branch master
Your branch is up to date with 'origin/master'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)


nothing added to commit but untracked files present (use "git add" to track)

Diff Detail

rCDFJ Dockerfiles for Jenkins
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

anlambert created this revision.


  • install as root and in /opt
  • update commit message
vlorentz added a subscriber: vlorentz.



We may move it to swh-web eventually, though

This revision is now accepted and ready to land.Fri, Jul 16, 5:06 PM

Not if we bundle the WASM module in swh-search data files, swh-web will serve it as static file (just a static dir to add in django settings) in order to be consumed by web-tree-sitter.