{"id":18352426,"url":"https://github.com/limpix31/plugin-repack","last_synced_at":"2026-05-06T04:05:40.191Z","repository":{"id":163299476,"uuid":"637655094","full_name":"LIMPIX31/plugin-repack","owner":"LIMPIX31","description":"One yarn plugin that can make wasm cozy","archived":false,"fork":false,"pushed_at":"2023-10-12T12:55:02.000Z","size":75274,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T00:47:05.767Z","etag":null,"topics":["plugin","rust","wasm","webassembly","yarn","yarn-pnp"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LIMPIX31.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-08T06:13:42.000Z","updated_at":"2023-06-08T07:36:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"977d4342-fb12-4c5f-a4a6-4a20a044d644","html_url":"https://github.com/LIMPIX31/plugin-repack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LIMPIX31/plugin-repack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIMPIX31%2Fplugin-repack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIMPIX31%2Fplugin-repack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIMPIX31%2Fplugin-repack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIMPIX31%2Fplugin-repack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LIMPIX31","download_url":"https://codeload.github.com/LIMPIX31/plugin-repack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIMPIX31%2Fplugin-repack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32677935,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T02:33:58.958Z","status":"ssl_error","status_checked_at":"2026-05-06T02:33:39.611Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["plugin","rust","wasm","webassembly","yarn","yarn-pnp"],"created_at":"2024-11-05T21:35:55.783Z","updated_at":"2026-05-06T04:05:40.170Z","avatar_url":"https://github.com/LIMPIX31.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Repack 1.1\n###### Yarn plugin for easy integration of rust wasm into a web or nodejs project\u003c/h6\u003e\n\n## Installation\n1. [Install rust nightly toolchain and cargo](https://www.rust-lang.org/tools/install)\n2. Setup rust for **wasm32-unknown-unknown** target\n3. Install yarn (v3/4)\n4. Install plugin in the project with cargo workspaces + yarn workspaces\n```bash\nyarn plugin import https://raw.githubusercontent.com/LIMPIX31/plugin-repack/master/yarn-plugin/bundles/@yarnpkg/plugin-repack.js\nyarn repack install\n```\n\n## Usage\n\n### Create wasm crate\n```bash\ncargo new --lib hello-world\n```\n\n#### ...and add target\n```toml\n[lib]\ncrate-type = [\"cdylib\"]\n\n[repack]\ntarget = \"web\" # or \"nodejs\"\n```\n\n\n#### ...and add crate to cargo workspaces\n```toml\n[workspace]\nmembers = [\n  \"hello-world\"\n]\n```\n\n### Add crate to yarn workspace dependencies and build\n```json\n{\n \"name\": \"my-project\",\n \"version\": \"1.0.0\",\n \"main\": \"src/index.ts\",\n \"dependencies\": {\n   \"@crate/hello-world\": \"crate:*\"\n }\n}\n```\n\n#### ...then make the initial build\n```bash\nyarn\n```\n\n### Rebuild crates\n```\n# Try rebuild only hello-world\nyarn repack rebuild hello-world\n# Try rebuild all crates\nyarn repack rebuild\n# Try rebuild hello-world crate for release\nyarn repack rebuild --release hello-world\n```\n\n### Import your crate\n```ts\nimport { hello_world } from '@crate/hello-world'\n```\n\n## Example\nYou can find examples in `examples` branch\n```\ngit checkout examples\n```\n\n## Known issues\n\n### When using vite, you need to exclude crate\n```ts\nexport default defineConfig({\n  plugins: [react()],\n  build: {\n    target: 'esnext'\n  },\n  optimizeDeps: {\n    exclude: ['@crate/my-crate']\n  },\n})\n```\n\n## Misc\n\n### `@crate` scope\n...is required. It is needed to restrict your dependencies semantically, so that you can understand that you are importing a crate and not something else\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flimpix31%2Fplugin-repack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flimpix31%2Fplugin-repack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flimpix31%2Fplugin-repack/lists"}