asterius icon indicating copy to clipboard operation
asterius copied to clipboard

Implement flexible bundling of the runtime

Open TerrorJack opened this issue 5 years ago • 0 comments

Is your feature request related to a problem? Please describe. Currently, our runtime bundling logic uses the entry script file as the root file, and always includes the whole runtime transitively into the resulting script file. When users need to use multiple asterius instances in a single web page, multiple bundled script files are loaded, each including a minified copy of the runtime.

Describe the solution you'd like We should implement flexible bundling of the runtime. When targetting the web, a pre-bundled rts.js should be reusable for all asterius instances in the same page. Each asterius instance can be loaded from a .wasm file and a .js file which only includes the program-specific data. When targetting the worker runtime, the old bundling behavior which generates a single .js file is still preferred.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

TerrorJack avatar Aug 25 '20 20:08 TerrorJack