Hey there 🤗, Welcome to my GSoC Journey
This is a series of blogs that I am writing to share my amazing GSoC 22 (Google Summer of Code 2022) Journey with you all.
Adding Print support and Deploying on Live Site
In this week, I-
- added support for printing in the generated wasm binary
- added support for stop and error stop
- built the LCompilers Frontend for
LFortran
(compiled towasm
) and deployed it toGitHub Pages
with the compiledlfortran wasm binary
.
I also worked on my Compiling LFortran to wasm task of Week/Blog 2. The same blog has been updated and can be found here.
During this weeks endeavour, I faced challenges at two places:
-
After upgrading my
node
version (as stated here), myemscripten
stopped working. I neededemscripten
to compileLFortran
towasm
. Things started working when I successfully uninstalled my upgradednode
and reinstalledemscripten
. And I was able to buildLFortran
towasm
usingemscripten
. -
Even though
emscripten
was fixed andLFortran
was successfully compiling towasm
, it did not haveC++ exceptions
support. As per !1549, we need to add the flag-fexceptions
to enable exception support. Even after including the-fexceptions
flags, exceptions were still not being supported. Withoutexceptions
support theLCompilers Frontend
was not showing the hints/feedback if there were errors in the source code. I tried different combination ofemscripten
flags and finally found that- the flag
-s STANDALONE_WASM
was somehow not-allowing/disablingexceptions
support - apart from including
-fexceptions
asemscripten
flags,-fexceptions
is also needed to be included asCXX_DEBUG_FLAGS
in thebuild_to_wasm.sh
script
- the flag
This phase was mostly/approximately from 18-06-2022
to 24-06-2022
.
The MRs during this phase are as follows:
- !1794 WASM: Add print support
- !1795 WASM: parse empty source code
- !1797 WASM: Add support for stop and error stop
Also,
GitHub Repo for Frontend: https://github.com/Shaikh-Ubaid/lcompilers_frontend
Live Site: https://shaikh-ubaid.github.io/lcompilers_frontend/
Upcoming Tasks for next week:
- Building a NodeJS testing infrastructure #712
- Adding support for
if-else
statements in theWASM Backend
#700
That’s all for this blog. Thank you for your time. We continue this series in the next blog.