Saturday, May 01, 2021

Emscripten and fetching NPM dependencies listed by extracted distfiles

Hello all,

I am cleaning up my initial port of Emscripten. I have a recent
project to port something to the MS Hololens and I aim to avoid the
disposable WinStore / UWP stuff. Because of this, WebXR seems the
better approach if I can leverage my existing C++ codebase.

https://github.com/osen/openbsd_emscripten/blob/master/Makefile

Emscripten is mostly just Clang targeted for the WebAssembly
platform and so far everything is working quite well.

However the supporting scripts themselves follow a very "web
development" kind of structure and as such they not only rely on
many different random scripting languages (Python, Node, JDK) but
they also drag in a whole heap of (annoyingly trivial) dependencies.

The one giving the most issue is the Javascript dependencies from
NPM. These are listed inside the Emscripten distfile but this needs
to be extracted before I can get this large NPM list (package.json).
What is the recommended way to do this? I have looked through a
number of similar ports but as far as I can tell they simply fetch
them in during the build (which is what I currently do). Surely we
want to grab this list during the fetch stage rather than the build
stage?

Many thanks,

Karsten

No comments:

Post a Comment