{"id":21991907,"url":"https://github.com/elct9620/mwc","last_synced_at":"2025-04-30T14:21:24.244Z","repository":{"id":36459809,"uuid":"224832995","full_name":"elct9620/mwc","owner":"elct9620","description":"The tool to compile mruby on WebAssembly","archived":false,"fork":false,"pushed_at":"2023-03-16T00:53:54.000Z","size":107,"stargazers_count":18,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-24T23:25:51.494Z","etag":null,"topics":["gem","mruby","ruby","webassembly"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elct9620.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-29T10:35:34.000Z","updated_at":"2024-04-28T10:09:36.000Z","dependencies_parsed_at":"2023-02-10T20:30:35.560Z","dependency_job_id":null,"html_url":"https://github.com/elct9620/mwc","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elct9620%2Fmwc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elct9620%2Fmwc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elct9620%2Fmwc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elct9620%2Fmwc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elct9620","download_url":"https://codeload.github.com/elct9620/mwc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227206373,"owners_count":17747734,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gem","mruby","ruby","webassembly"],"created_at":"2024-11-29T20:12:08.258Z","updated_at":"2024-11-29T20:12:08.886Z","avatar_url":"https://github.com/elct9620.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"MWC\n===\n[![Gem Version](https://badge.fury.io/rb/mwc.svg)](https://badge.fury.io/rb/mwc) [![Build Status](https://travis-ci.com/elct9620/mwc.svg?branch=master)](https://travis-ci.com/elct9620/mwc) [![Maintainability](https://api.codeclimate.com/v1/badges/ecd47b22321830b73d78/maintainability)](https://codeclimate.com/github/elct9620/mwc/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/ecd47b22321830b73d78/test_coverage)](https://codeclimate.com/github/elct9620/mwc/test_coverage)\n\nThe tool for the developer to help them create mruby applications on the WebAssembly.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'mwc'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install mwc\n\n## Requirement\n\n* Curl\n* Tar\n* Emscripten SDK\n* Ruby 2.6+\n\n\u003e Please make sure you can execute `emcc` before use `mwc compile`\n\n## Usage\n\n### Create Project\n\nExecute below command with your project name:\n\n    $ mwc init my_mrb\n\nThis gem will create a directory `my_mrb` with anything you need to play with mruby on WebAssembly.\n\n### Source code detect\n\n* `src/**/*.c` the normal C code\n* `src/js/**/*.lib.js` the JavaScript library can be called in C\n* `src/js/**/*.pre.js` the JavaScript prepend to WebAssembly JS\n* `src/js/**/*.post.js` the JavaScript append to WebAssembly JS\n\n### Compile\n\nTo compile `*.c` to `.wasm` you have to execute `compile` command:\n\n    $ mwc compile\n\nYou can specify compile environment to change with different options:\n\n    $ mwc compile --env=dev\n\nTo see more usage with `help` command:\n\n    $ mwc help compile\n\n### Serve compiled files\n\nThe `mwc` has built-in static file server to help preview or debug:\n\n    $ mwc server\n\nAnd then, open the `http://localhost:8080` you will see the Emscripten web shell and `Hello World` is printed.\n\n## Configure\n\nWe use DSL to define the compile preferences in `.mwcrc`\n\n```ruby\nproject.name = 'mruby'\nmruby.version = '2.1.3'\n\nenv :dev do\n  project.source_map = true\nend\n```\n\n### Project\n\n|Name|Type|Description\n|----|----|-----------\n|name|string| The project name, will change the generated file name. ex. `mruby.wasm`\n|shell|string| The shell file template, if you want to use your own html template\n|source_map|boolean| Enable source map for debug\n|options|array| Extra compile options. ex. `-s ALLOW_MEMORY_GROWTH=1`\n\n### mruby\n\n|Name|Type|Description\n|----|----|-----------\n|version|string| The prefer mruby version\n\n## Roadmap\n\n* [ ] Unit Test\n* [ ] Download options for mruby\n  * [x] Archive\n  * [ ] Git Submodule\n* [ ] Integrate to Webpack\n* [ ] Watch Mode\n  * [x] Auto re-compile\n  * [ ] Add LiveReload support\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/elct9620/mwc. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Mwc project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/elct9620/mwc/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felct9620%2Fmwc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felct9620%2Fmwc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felct9620%2Fmwc/lists"}