Skip to content
Leszek Grzanka edited this page Apr 14, 2023 · 6 revisions

Link to the libamtrack core library

In order to bump the link manually follow these steps:

Check what is the current version and compare it with https://github.com/libamtrack/library

cd library
git log

If you simply type git pull in the main directory only the main repo will be updated. To update the submodule, go to the root of your repository and run the following command:

git submodule update --remote

Push the changes to the remote repo:

cd ..
git add library
git commit -m "submodule bump"
git push

Deployment on gitpod

GSL static libraries should be already compiled (their compilation is time-consuming) and copied to library/distributions/JavaScript/. There is no need to recompile them every time.

Set up emsdk:

source $HOME/emsdk/emsdk_env.sh
emcc --version

Compile wasm files:

cd library/distributions/JavaScript && GSL_INCLUDE_DIRS=$HOME/usr/include GSL_LIBRARY=$HOME/usr/lib/libgsl.a GSL_CBLAS_LIBRARY=$HOME/usr/lib/libgslcblas.a  ./compile_to_js.sh && cd -

Copy generated files into the proper place:

cp library/distributions/JavaScript/output/libat.wasm src/
cp library/distributions/JavaScript/output/libat.js src/
mkdir -p src/static/js
cp library/distributions/JavaScript/output/libat.wasm src/static/js/
cp library/distributions/JavaScript/output/libat.js src/static/js/

Compile NPM modules and start the server:

npm install
npm run start
Clone this wiki locally