Skip to content

Commit

Permalink
Merge pull request #3805 from rism-digital/develop-emcripten-settings
Browse files Browse the repository at this point in the history
Adjust emcc settings
  • Loading branch information
lpugin authored Oct 2, 2024
2 parents 2e7290c + efbb682 commit de5f0a1
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 46 deletions.
48 changes: 2 additions & 46 deletions emscripten/buildToolkit
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ if ($wasmQ) {
$LFLAGS = " -s WASM=1";
$LFLAGS .= " -s INITIAL_MEMORY=512MB";
$LFLAGS .= " -s STACK_SIZE=256MB";
$LFLAGS .= " -s ALLOW_MEMORY_GROWTH";
$LFLAGS .= " -s SINGLE_FILE=1";
$LFLAGS .= " -s INCOMING_MODULE_JS_API=onRuntimeInitialized";
if ($debug) {
Expand Down Expand Up @@ -186,52 +187,7 @@ $cmake .= " -DNO_MUSICXML_SUPPORT=ON" if ($nomusicxml);
my $embed = "--embed-file $DATA_DIR/";
my $output = "-o $BUILD_DIR/verovio.js";

my $exports = "-s EXPORTED_FUNCTIONS=\"[";
$exports .= "'_enableLog',";
$exports .= "'_enableLogToBuffer',";
$exports .= "'_vrvToolkit_constructor',";
$exports .= "'_vrvToolkit_destructor',";
$exports .= "'_vrvToolkit_edit',";
$exports .= "'_vrvToolkit_editInfo',";
$exports .= "'_vrvToolkit_getAvailableOptions',";
$exports .= "'_vrvToolkit_getDefaultOptions',";
$exports .= "'_vrvToolkit_getDescriptiveFeatures',";
$exports .= "'_vrvToolkit_getElementAttr',";
$exports .= "'_vrvToolkit_getElementsAtTime',";
$exports .= "'_vrvToolkit_getExpansionIdsForElement',";
$exports .= "'_vrvToolkit_getHumdrum',";
$exports .= "'_vrvToolkit_convertHumdrumToHumdrum',";
$exports .= "'_vrvToolkit_convertHumdrumToMIDI',";
$exports .= "'_vrvToolkit_convertMEIToHumdrum',";
$exports .= "'_vrvToolkit_getLog',";
$exports .= "'_vrvToolkit_getMEI',";
$exports .= "'_vrvToolkit_getMIDIValuesForElement',";
$exports .= "'_vrvToolkit_getNotatedIdForElement',";
$exports .= "'_vrvToolkit_getOptions',";
$exports .= "'_vrvToolkit_getPageCount',";
$exports .= "'_vrvToolkit_getPageWithElement',";
$exports .= "'_vrvToolkit_getTimeForElement',";
$exports .= "'_vrvToolkit_getTimesForElement',";
$exports .= "'_vrvToolkit_getVersion',";
$exports .= "'_vrvToolkit_loadData',";
$exports .= "'_vrvToolkit_loadZipDataBase64',";
$exports .= "'_vrvToolkit_loadZipDataBuffer',";
$exports .= "'_vrvToolkit_redoLayout',";
$exports .= "'_vrvToolkit_redoPagePitchPosLayout',";
$exports .= "'_vrvToolkit_renderData',";
$exports .= "'_vrvToolkit_renderToExpansionMap',";
$exports .= "'_vrvToolkit_renderToMIDI',";
$exports .= "'_vrvToolkit_renderToPAE',";
$exports .= "'_vrvToolkit_renderToSVG',";
$exports .= "'_vrvToolkit_renderToTimemap',";
$exports .= "'_vrvToolkit_resetOptions',";
$exports .= "'_vrvToolkit_resetXmlIdSeed',";
$exports .= "'_vrvToolkit_select',";
$exports .= "'_vrvToolkit_setOptions',";
$exports .= "'_vrvToolkit_validatePAE',";
$exports .= "'_malloc',";
$exports .= "'_free'";
$exports .= "]\"";
my $exports = "-s EXPORTED_FUNCTIONS=\@exports.txt";

my $extra_exports = "-s EXPORTED_RUNTIME_METHODS='[\"cwrap\", \"HEAPU8\"]'";

Expand Down
44 changes: 44 additions & 0 deletions emscripten/exports.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
_enableLog
_enableLogToBuffer
_vrvToolkit_constructor
_vrvToolkit_destructor
_vrvToolkit_edit
_vrvToolkit_editInfo
_vrvToolkit_getAvailableOptions
_vrvToolkit_getDefaultOptions
_vrvToolkit_getDescriptiveFeatures
_vrvToolkit_getElementAttr
_vrvToolkit_getElementsAtTime
_vrvToolkit_getExpansionIdsForElement
_vrvToolkit_getHumdrum
_vrvToolkit_convertHumdrumToHumdrum
_vrvToolkit_convertHumdrumToMIDI
_vrvToolkit_convertMEIToHumdrum
_vrvToolkit_getLog
_vrvToolkit_getMEI
_vrvToolkit_getMIDIValuesForElement
_vrvToolkit_getNotatedIdForElement
_vrvToolkit_getOptions
_vrvToolkit_getPageCount
_vrvToolkit_getPageWithElement
_vrvToolkit_getTimeForElement
_vrvToolkit_getTimesForElement
_vrvToolkit_getVersion
_vrvToolkit_loadData
_vrvToolkit_loadZipDataBase64
_vrvToolkit_loadZipDataBuffer
_vrvToolkit_redoLayout
_vrvToolkit_redoPagePitchPosLayout
_vrvToolkit_renderData
_vrvToolkit_renderToExpansionMap
_vrvToolkit_renderToMIDI
_vrvToolkit_renderToPAE
_vrvToolkit_renderToSVG
_vrvToolkit_renderToTimemap
_vrvToolkit_resetOptions
_vrvToolkit_resetXmlIdSeed
_vrvToolkit_select
_vrvToolkit_setOptions
_vrvToolkit_validatePAE
_malloc
_free

0 comments on commit de5f0a1

Please sign in to comment.