ruby-wasm
ruby-wasm copied to clipboard
Build several scripts at a time
This is listed as a missing feature in the documentation. Am opening an issue to track it.
I would love to work on this.
Awesome, would be great to have that, and happy to help where I can. Ideally, this could work much like require in regular Ruby. While require isn't supported in MRuby out of the box, there are a couple projects providing that functionality: iij/mruby-require and mattn/mruby-require. I don't know much about each, but would be useful to investigate how they work.
In a simpler example, we could have the user provide a list of Ruby scripts to build, which could be provided on the command line, e.g.:
ruby-wasm build one.rb two.rb three.rb
Or provide a config/manifest file in YAML, e.g.:
files:
- one.rb
- two.rb
- three.rb
And build/combine with:
ruby-wasm build manifest.yml
Not as clean or intuitive as require, but easier to implement. Would be interested to hear your ideas!