Closed 414owen closed 2 years ago
sick! very curious to find out how I will deal with the C when adding features :grin:
@414owen realloc
is not exported, so this would still require a patch.
Running the parser on haskell-language-server errors out with:
RuntimeError: Aborted(Assertion failed: undefined symbol `__assert_fail`.
perhaps a side module was not linked in?
if this global was expected to arrive from a system library,
try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment)
Which, I think, probably means that you have a failed assertion in there somewhere?
This aligns with my previous observations that the WASM tests would loop indefinitely on haskell-language-server.
ugh why are the GA checks not running for PRs from forks
I'm working on patching the CI :)
I like the pure C too myself, been dealing with C++14 issues for a while now at more than one place!
This should solve all past and future portability issues, because the C runtime is pretty ubiquitous.
The only generics we were using was in
vector
s, which I've preserved, with some macros.C has no u32string, so I've used the vector macros to solve that too.
We lose namespaces ¯\(ツ)/¯.
The code is structurally the exact same.
We seem to have gained a bit of speed, compared to the C++ version (probably not statistically significant):
@wenkokke does this remove the need to patch
tree-sitter
for your wasm builds?After this change,
stdio.h
is only required for-DDEBUG
builds.