{"id":20252663,"url":"https://github.com/streamdal/wasm","last_synced_at":"2025-05-07T12:32:56.717Z","repository":{"id":185122107,"uuid":"662778668","full_name":"streamdal/wasm","owner":"streamdal","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-12T03:18:15.000Z","size":10048,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2023-12-12T04:26:37.144Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/streamdal.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}},"created_at":"2023-07-05T21:49:30.000Z","updated_at":"2023-12-12T04:26:40.570Z","dependencies_parsed_at":"2023-12-12T04:36:41.755Z","dependency_job_id":null,"html_url":"https://github.com/streamdal/wasm","commit_stats":null,"previous_names":["streamdal/snitch-wasm","streamdal/wasm"],"tags_count":13,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamdal%2Fwasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamdal%2Fwasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamdal%2Fwasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamdal%2Fwasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/streamdal","download_url":"https://codeload.github.com/streamdal/wasm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224600997,"owners_count":17338460,"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-14T10:17:53.149Z","updated_at":"2024-11-14T10:17:53.853Z","avatar_url":"https://github.com/streamdal.png","language":"Rust","readme":"Wasm\n====\n[![Release WASM files](https://github.com/streamdal/wasm/actions/workflows/release.yml/badge.svg)](https://github.com/streamdal/wasm/actions/workflows/release.yml)\n[![Pull Request](https://github.com/streamdal/wasm/actions/workflows/pr.yml/badge.svg)](https://github.com/streamdal/wasm/actions/workflows/pr.yml)\n\n# [THIS REPO HAS MOVED!](https://github.com/streamdal/mono)\n\nThis repository contains all of the Wasm funcs used by various \n[Streamdal](https://github.com/streamdal/streamdal) components.\n\nTo build: `make build`\n\nBuild artifacts are placed in `./build/*`.\n\nTo test: `make test`\n\nReleases are automatically tagged on merge to `main`.\n\n## Wasm Artifact Size\n\nClose to 50% size reduction is achieved by using `lto = true` in `Cargo.toml`.\n\nAs per [this doc](https://rustwasm.github.io/docs/book/reference/code-size.html),\nthis tells LLVM to inline and prune functions which improves both speed and size.\n\nWe get another 15-20% reduction by using `wasm-opt` (with `Os` flag).\n\nResult is as follows:\n\n```bash\n~/Code/streamdal/wasm/build main* ⇡                                                                          2h41m ✖ ⚑ ◒\n❯ du -sh *\n1.9M\tdetective.lto+wasm-opt.wasm\n2.4M\tdetective.lto-only.wasm\n```\n\nWithout any of the size optimizations, the initial binary size is ~4.2MB.\n\nCompile + optimization time is ~45s on an M2.\n\n## Developing\n\nTo update protobuf definitions across all modules, run `bash update_protos.sh 1.2.3`. This will replace the \nversion of `streamdal-protos` across all `Cargo.toml` files and run a `cargo update` to pull in the new version.\n\n## Release\n\nReleasing is semi-automatic - you have to manually create and push a new `v0.0.0`\ntag and Github Actions will pick up the commit and create a new release.\n\n```\ngit tag v0.0.4\ngit push --tags\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamdal%2Fwasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstreamdal%2Fwasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamdal%2Fwasm/lists"}