The startup time is fine on my side: around 8 seconds, since
it is hosted locally. Maybe we can speed it up further by
combining several lisp files into one.
About the memory issue: your LD_FLAGS didn't take effect,
you should export it before emconfigure. I can now build
wasm version of ecl locally, and it does not have memory
issues, it now can do big computation like integration.
Just like "lisp/compile-interp.lisp", you can use
"lisp/compile-algebra.lisp" to pre-compile algebra files
into bytecode.
BTW, I've update fricas0 to 1.3.13.
- Qian
On 4/11/26 12:22 AM, Yanshu Wang wrote:
> Thanks. It works! Although startup time takes 2min. FS.createLazyFile is
> too slow when loading a large amount of files. Preloading them into
> IDBFS is much faster. I may implement this when I have free time.
> Try it here:
>
https://wangyenshu.github.io/fricas-wasm/ <
https://wangyenshu.github.io/
> fricas-wasm/>
> On Friday, April 10, 2026 at 7:56:14 PM UTC+8 oldk1331 wrote:
>
> I can't build wasm version of ecl. Can you tweak the various
> memory related flags on your side and see if it makes a difference?
>
> To bytecode compile fricas0, try to add following to fricas.lisp:
>
> (ext:install-bytecodes-compiler)
> (setq |$lisp_bin_filetype| "fasc")
>
> ecl --load fricas ## then type: )lisp (load "lisp/compile-interp.lisp")
>
> then modify lisp/interp.lisp to load fasc instead of lisp,
> and regenerate fricas-fs.json.
>
> I also need to put (ext:set-limit 'ext:heap-size 256000000)
> at the top of fricas.lisp.
>
> - Qian
>
> On 4/10/26 7:23 PM, Yanshu Wang wrote:
> > Hello Qian.
> >
> > The flag ALLOW_MEMORY_GROWTH is already enabled. You can see the
> > complete flag here:
> >
https://github.com/wangyenshu/fricas-wasm/blob/main/build.sh
> <
https://github.com/wangyenshu/fricas-wasm/blob/main/build.sh>
> <https://
> >
github.com/wangyenshu/fricas-wasm/blob/main/build.sh <http://
>
github.com/wangyenshu/fricas-wasm/blob/main/build.sh>>
> > This script will build the wash version of ecl.
> >
> > I can try to load the compiled files.
> > On Friday, April 10, 2026 at 4:41:32 PM UTC+8 oldk1331 wrote:
> >
> > With compiling lisp files to byte-code files "fasc",
> > I can get interpreter loading and compute very simple math,
> > loading more algebra files will OOM.
> >
> > I highly suspect that this default ECL settings only have
> > a few hundred MB of memory available.
> > (As firefox tools showed me it only uses 130MB.)
> >
> > The error message is:
> >
> > Aborted(OOM) ecl.js:1:3888
> > abort
http://127.0.0.1:8000/ecl.js:1 <
http://127.0.0.1:8000/
> ecl.js:1> <
http://127.0.0.1:8000/ecl.js:1 <
http://127.0.0.1:8000/
> oldk1331/fricas0> <
https://github.com/ <
https://github.com/>
>
github.com/oldk1331/> <
https://github.com/ <
https://github.com/>
> > wangyenshu/fricas-wasm> <
https://github.com/ <
https://github.com/>
> >
wangyenshu.github.io/fricas-wasm/ <
http://wangyenshu.github.io/
> fricas- <
https://groups.google.com/d/msgid/fricas->
> > devel/2978c30f-5d7a-4684-b504-7056a5959d93n%
40googlegroups.com
> <
http://40googlegroups.com> <https://
> >
groups.google.com/d/msgid/fricas-devel/2978c30f-5d7a-4684-
> <
http://groups.google.com/d/msgid/fricas-devel/2978c30f-5d7a-4684->
> > b504-7056a5959d93n%
40googlegroups.com?
> utm_medium=email&utm_source=footer <
http://40googlegroups.com?
> utm_medium=email&utm_source=footer>>.
> devel/fc611009-3324-4e4c-8a9b-454056caa03cn%
40googlegroups.com <https://
>
groups.google.com/d/msgid/fricas-devel/
> fc611009-3324-4e4c-8a9b-454056caa03cn%
40googlegroups.com?
> utm_medium=email&utm_source=footer>.