{"id":21660085,"url":"https://github.com/deislabs/yo-wasm","last_synced_at":"2025-07-21T21:31:36.605Z","repository":{"id":44899235,"uuid":"294301903","full_name":"deislabs/yo-wasm","owner":"deislabs","description":"Yeoman generator for Rust projects intended to build to WASM in OCI registries","archived":true,"fork":false,"pushed_at":"2022-08-04T23:07:54.000Z","size":426,"stargazers_count":68,"open_issues_count":6,"forks_count":9,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-06-16T23:50:11.638Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deislabs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-10T04:23:40.000Z","updated_at":"2025-02-13T06:23:08.000Z","dependencies_parsed_at":"2022-09-26T17:40:27.244Z","dependency_job_id":null,"html_url":"https://github.com/deislabs/yo-wasm","commit_stats":null,"previous_names":["deislabs/generator-wasm"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/deislabs/yo-wasm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deislabs%2Fyo-wasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deislabs%2Fyo-wasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deislabs%2Fyo-wasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deislabs%2Fyo-wasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deislabs","download_url":"https://codeload.github.com/deislabs/yo-wasm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deislabs%2Fyo-wasm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266101242,"owners_count":23876752,"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":[],"created_at":"2024-11-25T09:32:10.834Z","updated_at":"2025-07-21T21:31:36.110Z","avatar_url":"https://github.com/deislabs.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# yo wasm\n\nGenerate WASM modules that can be pushed to OCI registries, for example\nfor use with [Krustlet](https://github.com/deislabs/krustlet).\n\n## Installation\n\nFirst, install [Yeoman](http://yeoman.io) using [npm](https://www.npmjs.com/) \n(we assume you have pre-installed [node.js](https://nodejs.org/)).\nThen install `generator-wasm` also using `npm`.\n\n```bash\nnpm install -g yo\nnpm install -g generator-wasm\n```\n\nThen generate your new project:\n\n```console\n$ mkdir myproject\n$ cd myproject\n$ yo wasm\n```\n\n## Setting up a project\n\nAfter you run the generator, it displays any language-specific instructions\nto get started - for examples, tools you need to have installed. The generated\n`README.md` may also contain information on compiling or running the project.\n\n### Setup and development servers\n\nYeoman installs a hook that prevents generators from talking to Web services\nwith self-signed certificates. If you are testing with a local or self-signed\ninstallation of an OCI registry, Hippo or Bindle, you will need to disable\nthis hook before starting Yeoman:\n\n```\nGLOBAL_AGENT_FORCE_GLOBAL_AGENT=false yo wasm\n```\n\n## Working on the generated project\n\nThe generated projects contain configuration files for Visual Studio Code to help\nwith the process of editing and testing.  You should be able to load a\ngenerated project into VS Code and have it:\n\n* Prompt you to install recommended extensions (don't just ignore these -\n  they may be needed for debugging!)\n* Provide a `Build WASM` task (available via the `Run Task` command)\n* Provide a `Debug WASM` debug configuration (available via the Run pane)\n\n_NOTE: These are not yet provided for the AssemblyScript template._\n\n## Publishing a project\n\nThe project contains a GitHub action (in `.github/workflows/release.yml`) that publishes\nyour WASM module to an OCI registry or to the Hippo platform.\n\n* It publishes a `canary` version whenever you push to `main`.\n* It publishes a versioned module whenever you create a tag from `main`\n  whose name begins with `v` (e.g. `v1.1.0`).\n\n_NOTE: `release.yml` watches the `main` branch.  If your repository uses the name\n`master` then you must change this in the workflow file._\n\n### Publishing to OCI\n\nAt the moment, the only pre-installed OCI registry is\nAzure Container Registry, but we'll expand this repertoire over time\n(and it should be reasonably easy to adapt the ACR steps to other registries).\nThe publish workflow needs to know three things:\n\n* The name of the registry to publish to.  For ACR, this is set via the `ACR_NAME`\n  variable in `release.yml` (and _excludes_ the `.azurecr.io` suffix).  The generator\n  sets this up for you, but if you want to change the publish registry, this is where\n  to do it.\n* The credentials for pushing to the registry.  For ACR, this is the ID and password\n  of a service principal with push permission to the registry.  You can create such\n  a service principal using the script at https://bit.ly/2ZsmeQS, but you **MUST**\n  change the `az ad sp create --role` parameter to `acrpush`.  This will print an\n  ID and password.  Then follow the instructions at https://bit.ly/2ZqS3cB to create\n  GitHub secrets named `ACR_SP_ID` and `ACR_SP_PASSWORD`.  The release workflow\n  will use those secrets to push the WASM module to ACR.\n\n_NOTE: during testing we sometimes see that GitHub workflows do not run on the initial\ncommit, or if you tag the initial commit. It usually works - but you **may** need to\npush a change to `main` before the workflows will run._\n\n### Publishing to Hippo\n\nHippo publishing configuration is similar to OCI configuration except that it needs:\n\n* The Hippo URL in `HIPPO_URL` (in `release.yml`)\n* The Bindle URL in `BINDLE_URL` (in `release.yml`)\n* The Hippo credentials in `HIPPO_USERNAME` and `HIPPO_PASSWORD` (in repo secrets)\n\n## Contributing\n\nThis project welcomes contributions and suggestions.  Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\n## Running from source\n\nIf you would like to run the generator from source, or modify it, you can clone\nthe repo and run `npm install \u0026\u0026 npm run compile \u0026\u0026 npm link` \nto hook it up to Yeoman so that you can run `yo wasm`.\n\n```console\n$ npm install -g yo\n$ npm install\n$ npm run compile\n$ npm link\n```\n\n[npm-image]: https://badge.fury.io/js/generator-wasm.svg\n[npm-url]: https://npmjs.org/package/generator-wasm\n[travis-image]: https://travis-ci.com/deislabs/generator-wasm.svg?branch=master\n[travis-url]: https://travis-ci.com/deislabs/generator-wasm\n[daviddm-image]: https://david-dm.org/deislabs/generator-wasm.svg?theme=shields.io\n[daviddm-url]: https://david-dm.org/deislabs/generator-wasm\n\n## Adding New Languages\n\nTo add a new language, follow these steps:\n\n- Add a new language installer in `languages`, e.g. `languages/swift.ts`\n- Inside that file, implement the `Language` interface. The `languages/rust.ts` file is a great example.\n- Add any template files that `yo wasm` should install for you.\n  - For example, Swift template files go in `templates/swift`\n  - Good starting points are VS Code config files, a `LICENSE`, and a `README.md`\n- Make sure that your `languages/` TypeScript is updated to point to those files.\n- Edit `index.ts` to modify the prompts there accordingly.\n  - Given that this code is evolving, we suggest opening the file and looking for the term `Rust`. Then replicate the same behaviors for your desired language.\n- Test it out by following the instructions in the **Running from source** section above.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeislabs%2Fyo-wasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeislabs%2Fyo-wasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeislabs%2Fyo-wasm/lists"}