codeforboston / codeforboston/anypia-js

Update and test build, esp in NodeJS

Open
#14 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Short version:
I used the below line to replace https://github.com/codeforboston/anypia-js/blob/master/anypiajs/CMakeLists.txt#L67 along with `./installbuild-emscripten-mac.sh` to compile `AnyPIAJS.mjs` for the [Windfall Awareness project](https://github.com/codeforboston/windfall-elimination/issues/209) using the July 2020 (>= 1.39.17) version of Emscripten (I used a new emscripten promise feature in the line below).

`set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-s USE_BOOST_HEADERS=1" LINK_FLAGS "-s USE_BOOST_HEADERS=1 -s EXPORT_ES6=1 -s USE_ES6_IMPORT_META=1 -s ENVIRONMENT=web -MODULARIZE=1 -s WASM=1 --bind ${EXPORTED_FUNCTIONS} ${EXPORTED_RUNTIME_METHODS}")`

But this change is not committed to this repository yet. Also `ENVIRONMENT=web` does not work with NodeJS so cannot be used in automated testing such as what we might want to do with TravisCI in this repo.

More details at https://github.com/codeforboston/windfall-elimination/issues/209

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at anypiajs/CMakeLists.txt around line 67 and inspect installbuild-emscripten-mac.sh, then compare the Emscripten settings with the NodeJS limitation described here. The work is done when the updated build is committed and the generated AnyPIAJS.mjs can be exercised by automated NodeJS testing without relying on ENVIRONMENT=web.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, javascript, node.js, wasm
Domain
build-system, testing
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.