Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing command-line arguments to an emscripten-generated application

When a C program is compiled with Emscripten, there is an HTML page generated that will display the results of the program. I was wondering how you could pass command line arguments to the application. For instance, with the original C program it's ./bfs 32 1.

like image 404
gnuvince Avatar asked May 01 '14 12:05

gnuvince


1 Answers

I was able to pass command line arguments by adding a line to the generated .html file. Not sure if this is the correct solution but it worked. There's a var Module declared. simply add the following line underneath: arguments: ['32', '1'],

like image 53
Robert Smies Avatar answered Sep 27 '22 21:09

Robert Smies