{"id":16866410,"url":"https://github.com/maxgraey/wasm-check","last_synced_at":"2025-05-08T00:39:28.849Z","repository":{"id":34460795,"uuid":"178900927","full_name":"MaxGraey/wasm-check","owner":"MaxGraey","description":"TypeScript / JavaScript library for detect WebAssembly features in node.js \u0026 browser","archived":false,"fork":false,"pushed_at":"2022-07-20T04:25:23.000Z","size":166,"stargazers_count":41,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-08T00:39:20.979Z","etag":null,"topics":["check","detect","detection","feature","support","validate","wasm","webassembly"],"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/MaxGraey.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}},"created_at":"2019-04-01T16:13:50.000Z","updated_at":"2024-10-24T10:14:04.000Z","dependencies_parsed_at":"2022-08-24T05:51:00.109Z","dependency_job_id":null,"html_url":"https://github.com/MaxGraey/wasm-check","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxGraey%2Fwasm-check","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxGraey%2Fwasm-check/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxGraey%2Fwasm-check/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxGraey%2Fwasm-check/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaxGraey","download_url":"https://codeload.github.com/MaxGraey/wasm-check/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252978669,"owners_count":21834910,"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":["check","detect","detection","feature","support","validate","wasm","webassembly"],"created_at":"2024-10-13T14:50:31.601Z","updated_at":"2025-05-08T00:39:28.805Z","avatar_url":"https://github.com/MaxGraey.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NPM registry](https://img.shields.io/npm/v/wasm-check.svg?style=for-the-badge)](https://www.npmjs.com/package/wasm-check)[![NPM license](https://img.shields.io/badge/license-mit-green.svg?style=for-the-badge)](LICENSE.md)\n\nLibrary for detect WebAssembly post-MVP features in NodeJS \u0026 Browser. Small and with zero dependencies.\n---\n\n## About post-MVP WebAssembly features\n\nhttps://github.com/WebAssembly/design/blob/master/FutureFeatures.md#tracking-issues\n\n_Tests on Canary with flags:_\n\nEnable some experimental features for Chrome Canary (Mac):\n```\n/Applications/Google\\ Chrome\\ Canary.app/Contents/MacOS/Google\\ Chrome\\ Canary --js-flags=\"--experimental-wasm-eh\"\n```\n\n## Support feature detections\n\n- [x] [Reference types](https://github.com/WebAssembly/reference-types) _(standardized)_\n- [x] [BigInt between js and wasm](https://github.com/WebAssembly/JS-BigInt-integration) _(standardized)_\n- [x] [Bulk memory operations](https://github.com/webassembly/bulk-memory-operations) _(standardized)_\n- [x] [Memory 64-bit](https://github.com/WebAssembly/memory64) _(--experimental-wasm-memory64)_\n- [x] [Exceptions](https://github.com/WebAssembly/exception-handling) _(--experimental-wasm-eh)_\n- [x] [Multi values](https://github.com/WebAssembly/multi-value) _(standardized)_\n- [x] [Tail recursion calls](https://github.com/webassembly/tail-call) _(--experimental-wasm-return-call)_\n- [x] [Saturated (non-trapping) conversions from float to int](https://github.com/WebAssembly/nontrapping-float-to-int-conversions) _(standardized)_\n- [x] [Sign extensions](https://github.com/WebAssembly/sign-extension-ops) _(standardized)_\n- [x] [SIMD](https://github.com/webassembly/simd) _(standardized)_\n- [x] [Threads](https://github.com/webassembly/threads) _(standardized)_\n- [x] [Type reflection](https://github.com/WebAssembly/js-types) _(--experimental-wasm-type-reflection)_\n\n## Install\n\n```\nyarn add wasm-check\n```\n\nor\n\n```\nnpm i wasm-check\n```\n\n## Usage\n\n#### Check supported WebAssembly version\n\n```ts\nimport * as check from 'wasm-check';\n// or\n// const check = require('wasm-check');\n\nconsole.log(check.support());  // WebAssembly 1.0 (MVP)\nconsole.log(check.support(1)); // ^^^\nconsole.log(check.support(2)); // WebAssembly 2.0\n```\n\n#### Check supporting streaming compilation\n\n```ts\nimport * as check from 'wasm-check';\n\nconsole.log(check.supportStreaming);\n```\n\n#### Get all post-MVP WebAssembly features\n\n```ts\nimport * as check from 'wasm-check';\n\nconst features = { ...check.feature };\nconsole.log(features);\n```\n\nOutput:\n\n```js\n{\n  bigInt: true,\n  bulk: true,\n  exceptions: false,\n  memory64: false,\n  mutableGlobal: true,\n  multiValue: true,\n  saturateConversions: true,\n  signExtensions: true,\n  tailCall: false,\n  threads: false,\n  simd: false,\n  references: false,\n  typeReflection: false,\n  funcReferences: false\n}\n```\n\n#### Or check concrete feature\n\n```ts\nimport * as check from 'wasm-check';\n\nconsole.log(check.feature.simd); // has SIMD support?\nconsole.log(check.feature.tailCalls); // has tail call optimization support?\n```\n\n#### TODO\n\n- [ ] GC integration feature check\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxgraey%2Fwasm-check","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxgraey%2Fwasm-check","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxgraey%2Fwasm-check/lists"}