{"id":27863352,"url":"https://github.com/denosaurs/wasabi","last_synced_at":"2025-05-04T20:50:04.508Z","repository":{"id":38424622,"uuid":"268144331","full_name":"denosaurs/wasabi","owner":"denosaurs","description":"🍣 Template repository for deno modules that want to use wasm","archived":false,"fork":false,"pushed_at":"2023-01-20T22:40:38.000Z","size":32,"stargazers_count":21,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T05:57:35.027Z","etag":null,"topics":["deno","rust","starter","template","wasabi","wasm"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/denosaurs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"open_collective":"denosaurs","github":"denosaurs"}},"created_at":"2020-05-30T19:13:18.000Z","updated_at":"2024-10-13T02:00:54.000Z","dependencies_parsed_at":"2023-02-12T06:16:36.455Z","dependency_job_id":null,"html_url":"https://github.com/denosaurs/wasabi","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denosaurs%2Fwasabi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denosaurs%2Fwasabi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denosaurs%2Fwasabi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denosaurs%2Fwasabi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denosaurs","download_url":"https://codeload.github.com/denosaurs/wasabi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251142894,"owners_count":21542603,"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":["deno","rust","starter","template","wasabi","wasm"],"created_at":"2025-05-04T20:50:03.922Z","updated_at":"2025-05-04T20:50:04.491Z","avatar_url":"https://github.com/denosaurs.png","language":"TypeScript","funding_links":["https://opencollective.com/denosaurs","https://github.com/sponsors/denosaurs"],"categories":[],"sub_categories":[],"readme":"# wasabi\n\nThis is a template repository for deno modules that want to use wasm. To use it\nsimply click the\n[\"Use this template\"](https://github.com/denosaurs/wasabi/generate) button to\ngenerate a new repo with all the stuff you need to get started writing rust and\nrunning it using wasm in deno.\n\n## Prerequisites\n\n| prerequisite                                            | installation                                             |\n| ------------------------------------------------------- | -------------------------------------------------------- |\n| [deno](https://deno.land/)                              | [deno_install](https://github.com/denoland/deno_install) |\n| [rust](https://www.rust-lang.org/)                      | [rustup](https://www.rust-lang.org/tools/install)        |\n| [rustfmt](https://github.com/rust-lang/rustfmt)         | `rustup component add rustfmt`                           |\n| [rust-clippy](https://github.com/rust-lang/rust-clippy) | `rustup component add clippy`                            |\n| [wasm-pack](https://rustwasm.github.io/wasm-pack/)      | `cargo install wasm-pack`                                |\n\n## Structure\n\n```\n├── .github\n│   ├── workflows\n│   │   ├── checks.yml  - Performs deno lint, fmt and test\n│   │   └── depsbot.yml - Checks the freshness of deno dependencies\n│   └── FUNDING.yml     - The denosaurs funding file, omit if not denosaur\n├── scripts             - A directory containing all development scripts\n│   ├── _deps.ts        - All of the dependencies for the scripts\n│   ├── _util.ts        - Utilities used in the scripts\n│   ├── build.ts        - The build script for generating the wasm.js file\n│   ├── clean.ts        - Removes all build data, often solving build issues\n│   ├── fmt.ts          - Formats both typescript and rust ignoring build data\n│   └── lint.ts         - Lints both typescript and rust ignoring build data\n├── src                 - The rust part of the module\n│   └── lib.rs          - The rust entry point\n├── pkg                 - Ignored by .gitignore, used when building\n├── target              - Ignored by .gitignore, used when building\n├── .gitignore          - A standard .gitignore file for ignoring build directories\n├── .rustfmt.toml       - The rustfmt configuration\n├── Cargo.toml          - A file describing the rust part of the module\n├── LICENSE             - A standard license file you are free to change to fit your needs\n├── mod.ts              - The entry point for the deno module\n├── README.md           - This readme file\n├── test.ts             - Containing tests\n└── wasm.js             - A js file containing the built wasm and some glue code generated by the build script\n```\n\n## Scripts\n\n### build\n\n```bash\n$ deno run --unstable --allow-read --allow-write --allow-run scripts/build.ts\nbuilding rust                  (\"wasm-pack build --target web --release\")\nread wasm                      (size: 1274 bytes)\ncompressed wasm using lz4      (reduction: 224 bytes, size: 1050 bytes)\nencoded wasm using base64      (increase: 350 bytes, size: 1400 bytes)\nread js                        (size: 1776 bytes)\ninlined js and wasm            (size: 3357 bytes)\nminified js                    (size reduction: 754 bytes, size: 2603 bytes)\nwriting output to file         (wasm.js)\nfinal size is: 2603 bytes\n```\n\n### clean\n\n```bash\n$ deno run --unstable --allow-read --allow-write --allow-run scripts/clean.ts\ncleaning cargo build           (\"cargo clean\")\nremoving pkg\n```\n\n### fmt\n\n```bash\n$ deno run --unstable --allow-run scripts/fmt.ts\nformatting typescript          (\"deno --unstable fmt scripts/ test_deps.ts test.ts mod.ts\")\nChecked 9 files\nformatting rust                (\"cargo fmt\")\n```\n\n### lint\n\n```bash\n$ deno run --unstable --allow-run scripts/lint.ts\nlinting typescript             (\"deno --unstable lint scripts test_deps.ts test.ts mod.ts\")\nChecked 9 files\nlinting rust                   (\"cargo clippy -q\")\n```\n\n## Testing\n\nRequires the `wasm.js` file to be [built](#build) first.\n\n```bash\n$ deno test\nrunning 1 tests\ntest add ... ok (2ms)\n\ntest result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out (2ms)\n```\n\n## Other\n\n### Contribution\n\nPull request, issues and feedback are very welcome. Code style is formatted with\n`deno fmt` and commit messages are done following\n[Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec.\n\n### Licence\n\nCopyright 2020, Denosaurs. All rights reserved. MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenosaurs%2Fwasabi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenosaurs%2Fwasabi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenosaurs%2Fwasabi/lists"}