####1. In crowdprocess/pre/data.json: ######Example: FireSim-Emscripten/crowdprocess/pre/data.json:
{
"input": {
"argv": [
{
"arg": "argument_value1",
"pos": "position of argument_value1"
},
{
"arg": "argument_value2",
"pos": "position of argument_value2"
}
]
}
}
####2. In generated code:
// var data is equal to read and parse ./data.json
Module['arguments'] = []
//Fixed arguments
if((data.input) && (data.input.argv)){
var argv = data.input.argv;
argv.forEach(function(arg){
Module['arguments'][arg.pos] = arg.arg;
});
}
Module.callMain(Module['arguments']);