From 9fa6a0f45005e96fff2520aa71fe48541dca676e Mon Sep 17 00:00:00 2001 From: Emilio Jesus Gallego Arias Date: Sat, 28 Sep 2024 16:32:17 +0200 Subject: [PATCH] [doc] [js] More docs on our JS setup. --- controller-js/README.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/controller-js/README.md b/controller-js/README.md index cd1c4659b..244cc00ca 100644 --- a/controller-js/README.md +++ b/controller-js/README.md @@ -18,16 +18,23 @@ information. The worker needs two parts to work: - the worker binary -- the worker filesystem +- the worker OCaml filesystem (`controller-js/coq-fs-core.js`) +- the worker Coq filesystem (`controller-js/coq-fs.js`) which are then bundled in a single `.js` file. -Type +The worker OCaml filesystem includes: +- `META` files for anything used by Coq +- transpiled `.cma` to `.js` files for plugins that will be loaded by Coq + +Type: ``` -make controller-js/coq-fs-core.js && make js +make patch-for-js # (only once, patch Coq for JS build) +make controller-js/coq-fs-core.js # build the OCaml filesystem, needed when plugins change +make js # build the worker and link with the FS. ``` -to build the worker filesystem and the worker, which will be placed under `editor/code/out`. +to get a working build in `editor/code/out`. As of now the build is very artisanal and not flexible at all, we hope to improve it soon. @@ -75,4 +82,3 @@ We need to have most `META` files in findlib, plus the Coq and - `/static/coqlib`: Coq root, with regular paths + `/static/coqlib/theories` + `/static/coqlib/user-contrib` -