{"_id":"@rollup/plugin-wasm","_rev":"2978133","name":"@rollup/plugin-wasm","description":"Import WebAssembly code with Rollup","dist-tags":{"latest":"6.1.3"},"maintainers":[{"name":"guybedford","email":"guybedford@gmail.com"},{"name":"lukastaegert","email":"lukas.taegert@tngtech.com"},{"name":"rich_harris","email":""},{"name":"shellscape","email":""}],"time":{"modified":"2023-06-21T16:39:07.000Z","created":"2019-10-30T12:42:36.141Z","6.1.3":"2023-05-12T13:48:03.319Z","6.1.2":"2023-01-20T23:35:06.607Z","6.1.1":"2022-12-17T15:23:07.509Z","6.1.0":"2022-12-17T15:08:13.333Z","6.0.1":"2022-10-21T19:11:25.638Z","6.0.0":"2022-10-10T17:20:53.604Z","5.2.0":"2022-04-29T23:43:23.104Z","5.1.2":"2020-12-14T14:23:44.344Z","5.1.1":"2020-10-27T02:48:04.225Z","5.1.0":"2020-09-09T17:46:36.328Z","5.0.0":"2020-05-20T14:14:37.638Z","4.0.0":"2020-05-02T22:37:59.316Z","3.0.0":"2019-10-30T12:42:36.141Z"},"users":{},"author":{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},"repository":{"url":"git+https://github.com/rollup/plugins.git","directory":"packages/wasm"},"versions":{"6.1.3":{"name":"@rollup/plugin-wasm","version":"6.1.3","publishConfig":{"access":"public"},"description":"Import WebAssembly code with Rollup","license":"MIT","repository":{"url":"git+https://github.com/rollup/plugins.git","directory":"packages/wasm"},"author":{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},"homepage":"https://github.com/rollup/plugins/tree/master/packages/wasm/#readme","bugs":{"url":"https://github.com/rollup/plugins/issues"},"main":"./dist/cjs/index.js","module":"./dist/es/index.js","exports":{"types":"./types/index.d.ts","import":"./dist/es/index.js","default":"./dist/cjs/index.js"},"engines":{"node":">=14.0.0"},"scripts":{"build":"rollup -c","ci:coverage":"nyc pnpm test && nyc report --reporter=text-lcov > coverage.lcov","ci:lint":"pnpm build && pnpm lint","ci:lint:commits":"commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}","ci:test":"pnpm test -- --verbose","prebuild":"del-cli dist","prepare":"if [ ! -d 'dist' ]; then pnpm build; fi","prerelease":"pnpm build","pretest":"pnpm build","release":"pnpm --workspace-root plugin:release --pkg $npm_package_name","test":"ava","test:ts":"tsc --noEmit"},"keywords":["rollup","plugin","webassembly","import","wasm","wast","wat","emscripten"],"peerDependencies":{"rollup":"^1.20.0||^2.0.0||^3.0.0"},"peerDependenciesMeta":{"rollup":{"optional":true}},"devDependencies":{"@rollup/plugin-typescript":"^9.0.1","del-cli":"^5.0.0","rollup":"^3.2.3","source-map":"^0.7.4","typescript":"^4.8.3"},"types":"./types/index.d.ts","ava":{"workerThreads":false,"files":["!**/fixtures/**","!**/helpers/**","!**/recipes/**","!**/types.ts"]},"contributors":[{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},{"name":"Colin Eberhardt","email":"colin.eberhardt@gmail.com"}],"gitHead":"0e23be7992a212f3b64d7df4e20a95fe1d50ba77","_id":"@rollup/plugin-wasm@6.1.3","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"shasum":"8d26a320780b15bf89d8d266ceda50823d5f978b","size":6160,"noattachment":false,"key":"/@rollup/plugin-wasm/-/@rollup/plugin-wasm-6.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/@rollup/plugin-wasm/download/@rollup/plugin-wasm-6.1.3.tgz"},"_npmUser":{"name":"shellscape","email":"andrew@shellscape.org"},"directories":{},"maintainers":[{"name":"guybedford","email":"guybedford@gmail.com"},{"name":"lukastaegert","email":"lukas.taegert@tngtech.com"},{"name":"rich_harris","email":""},{"name":"shellscape","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-wasm_6.1.3_1683899283119_0.5030113433763386"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-05-12T13:48:03.319Z","publish_time":1683899283319,"_source_registry_name":"default","_cnpm_publish_time":1683899283319},"6.1.2":{"name":"@rollup/plugin-wasm","version":"6.1.2","publishConfig":{"access":"public"},"description":"Import WebAssembly code with Rollup","license":"MIT","repository":{"url":"git+https://github.com/rollup/plugins.git","directory":"packages/wasm"},"author":{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},"homepage":"https://github.com/rollup/plugins/tree/master/packages/wasm/#readme","bugs":{"url":"https://github.com/rollup/plugins/issues"},"main":"./dist/cjs/index.js","module":"./dist/es/index.js","exports":{"types":"./types/index.d.ts","import":"./dist/es/index.js","default":"./dist/cjs/index.js"},"engines":{"node":">=14.0.0"},"scripts":{"build":"rollup -c","ci:coverage":"nyc pnpm test && nyc report --reporter=text-lcov > coverage.lcov","ci:lint":"pnpm build && pnpm lint","ci:lint:commits":"commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}","ci:test":"pnpm test -- --verbose","prebuild":"del-cli dist","prepare":"if [ ! -d 'dist' ]; then pnpm build; fi","prerelease":"pnpm build","pretest":"pnpm build","release":"pnpm --workspace-root plugin:release --pkg $npm_package_name","test":"ava","test:ts":"tsc --noEmit"},"keywords":["rollup","plugin","webassembly","import","wasm","wast","wat","emscripten"],"peerDependencies":{"rollup":"^1.20.0||^2.0.0||^3.0.0"},"peerDependenciesMeta":{"rollup":{"optional":true}},"devDependencies":{"@rollup/plugin-typescript":"^9.0.1","del-cli":"^5.0.0","rollup":"^3.2.3","source-map":"^0.7.4","typescript":"^4.8.3"},"types":"./types/index.d.ts","ava":{"workerThreads":false,"files":["!**/fixtures/**","!**/helpers/**","!**/recipes/**","!**/types.ts"]},"contributors":[{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},{"name":"Colin Eberhardt","email":"colin.eberhardt@gmail.com"}],"gitHead":"ace32029e0900fe708503e710b0a229a3d47440c","_id":"@rollup/plugin-wasm@6.1.2","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"shasum":"faf57f8e2ed12b9e0e898ba67963c52e1cd5f4c3","size":6179,"noattachment":false,"key":"/@rollup/plugin-wasm/-/@rollup/plugin-wasm-6.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@rollup/plugin-wasm/download/@rollup/plugin-wasm-6.1.2.tgz"},"_npmUser":{"name":"shellscape","email":"andrew@shellscape.org"},"directories":{},"maintainers":[{"name":"guybedford","email":"guybedford@gmail.com"},{"name":"lukastaegert","email":"lukas.taegert@tngtech.com"},{"name":"rich_harris","email":""},{"name":"shellscape","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-wasm_6.1.2_1674257706433_0.8071316644855491"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-01-20T23:35:06.607Z","publish_time":1674257706607,"_cnpm_publish_time":1674257706607},"6.1.1":{"name":"@rollup/plugin-wasm","version":"6.1.1","publishConfig":{"access":"public"},"description":"Import WebAssembly code with Rollup","license":"MIT","repository":{"url":"git+https://github.com/rollup/plugins.git","directory":"packages/wasm"},"author":{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},"homepage":"https://github.com/rollup/plugins/tree/master/packages/wasm/#readme","bugs":{"url":"https://github.com/rollup/plugins/issues"},"main":"./dist/cjs/index.js","module":"./dist/es/index.js","exports":{"types":"./types/index.d.ts","import":"./dist/es/index.js","default":"./dist/cjs/index.js"},"engines":{"node":">=14.0.0"},"scripts":{"build":"rollup -c","ci:coverage":"nyc pnpm test && nyc report --reporter=text-lcov > coverage.lcov","ci:lint":"pnpm build && pnpm lint","ci:lint:commits":"commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}","ci:test":"pnpm test -- --verbose","prebuild":"del-cli dist","prepare":"if [ ! -d 'dist' ]; then pnpm build; fi","prerelease":"pnpm build","pretest":"pnpm build","release":"pnpm --workspace-root plugin:release --pkg $npm_package_name","test":"ava","test:ts":"tsc --noEmit"},"keywords":["rollup","plugin","webassembly","import","wasm","wast","wat","emscripten"],"peerDependencies":{"rollup":"^1.20.0||^2.0.0||^3.0.0"},"peerDependenciesMeta":{"rollup":{"optional":true}},"devDependencies":{"@rollup/plugin-typescript":"^9.0.1","del-cli":"^5.0.0","rollup":"^3.2.3","source-map":"^0.7.4","typescript":"^4.8.3"},"types":"./types/index.d.ts","ava":{"workerThreads":false,"files":["!**/fixtures/**","!**/helpers/**","!**/recipes/**","!**/types.ts"]},"contributors":[{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},{"name":"Colin Eberhardt","email":"colin.eberhardt@gmail.com"}],"gitHead":"3425e4e5adf5b6e56a3f931ade1ac6ac4fe569d4","_id":"@rollup/plugin-wasm@6.1.1","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"shasum":"4433583997703c46ac22ebd7d079cf8f165a909b","size":5152,"noattachment":false,"key":"/@rollup/plugin-wasm/-/@rollup/plugin-wasm-6.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@rollup/plugin-wasm/download/@rollup/plugin-wasm-6.1.1.tgz"},"_npmUser":{"name":"shellscape","email":"andrew@shellscape.org"},"directories":{},"maintainers":[{"name":"guybedford","email":"guybedford@gmail.com"},{"name":"lukastaegert","email":"lukas.taegert@tngtech.com"},{"name":"rich_harris","email":""},{"name":"shellscape","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-wasm_6.1.1_1671290587308_0.0761966193426038"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-12-17T15:23:12.480Z","publish_time":1671290587509,"_cnpm_publish_time":1671290587509},"6.1.0":{"name":"@rollup/plugin-wasm","version":"6.1.0","publishConfig":{"access":"public"},"description":"Import WebAssembly code with Rollup","license":"MIT","repository":{"url":"git+https://github.com/rollup/plugins.git","directory":"packages/wasm"},"author":{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},"homepage":"https://github.com/rollup/plugins/tree/master/packages/wasm/#readme","bugs":{"url":"https://github.com/rollup/plugins/issues"},"main":"./dist/cjs/index.js","module":"./dist/es/index.js","exports":{"types":"./types/index.d.ts","import":"./dist/es/index.js","default":"./dist/cjs/index.js"},"engines":{"node":">=14.0.0"},"scripts":{"build":"rollup -c","ci:coverage":"nyc pnpm test && nyc report --reporter=text-lcov > coverage.lcov","ci:lint":"pnpm build && pnpm lint","ci:lint:commits":"commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}","ci:test":"pnpm test -- --verbose","prebuild":"del-cli dist","prepare":"if [ ! -d 'dist' ]; then pnpm build; fi","prerelease":"pnpm build","pretest":"pnpm build","release":"pnpm --workspace-root plugin:release --pkg $npm_package_name","test":"ava","test:ts":"tsc --noEmit"},"keywords":["rollup","plugin","webassembly","import","wasm","wast","wat","emscripten"],"peerDependencies":{"rollup":"^1.20.0||^2.0.0||^3.0.0"},"peerDependenciesMeta":{"rollup":{"optional":true}},"devDependencies":{"@rollup/plugin-typescript":"^9.0.1","del-cli":"^5.0.0","rollup":"^3.2.3","source-map":"^0.7.4","typescript":"^4.8.3"},"types":"./types/index.d.ts","ava":{"workerThreads":false,"files":["!**/fixtures/**","!**/helpers/**","!**/recipes/**","!**/types.ts"]},"contributors":[{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},{"name":"Colin Eberhardt","email":"colin.eberhardt@gmail.com"}],"gitHead":"47d6d8c36d07aebaab9d281a70c6f728055ae0e7","_id":"@rollup/plugin-wasm@6.1.0","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"shasum":"e0d66198646db1d9b7c677f7a3af062a9a26952e","size":5155,"noattachment":false,"key":"/@rollup/plugin-wasm/-/@rollup/plugin-wasm-6.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@rollup/plugin-wasm/download/@rollup/plugin-wasm-6.1.0.tgz"},"_npmUser":{"name":"shellscape","email":"andrew@shellscape.org"},"directories":{},"maintainers":[{"name":"guybedford","email":"guybedford@gmail.com"},{"name":"lukastaegert","email":"lukas.taegert@tngtech.com"},{"name":"rich_harris","email":""},{"name":"shellscape","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-wasm_6.1.0_1671289693155_0.059758207786620554"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-12-17T15:10:14.815Z","publish_time":1671289693333,"_cnpm_publish_time":1671289693333},"6.0.1":{"name":"@rollup/plugin-wasm","version":"6.0.1","publishConfig":{"access":"public"},"description":"Import WebAssembly code with Rollup","license":"MIT","repository":{"url":"git+https://github.com/rollup/plugins.git","directory":"packages/wasm"},"author":{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},"homepage":"https://github.com/rollup/plugins/tree/master/packages/wasm/#readme","bugs":{"url":"https://github.com/rollup/plugins/issues"},"main":"./dist/cjs/index.js","module":"./dist/es/index.js","exports":{"types":"./types/index.d.ts","import":"./dist/es/index.js","default":"./dist/cjs/index.js"},"engines":{"node":">=14.0.0"},"scripts":{"build":"rollup -c","ci:coverage":"nyc pnpm test && nyc report --reporter=text-lcov > coverage.lcov","ci:lint":"pnpm build && pnpm lint","ci:lint:commits":"commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}","ci:test":"pnpm test -- --verbose","prebuild":"del-cli dist","prepare":"if [ ! -d 'dist' ]; then pnpm build; fi","prerelease":"pnpm build","pretest":"pnpm build","release":"pnpm --workspace-root plugin:release --pkg $npm_package_name","test":"ava","test:ts":"tsc --noEmit"},"keywords":["rollup","plugin","webassembly","import","wasm","wast","wat","emscripten"],"peerDependencies":{"rollup":"^1.20.0||^2.0.0||^3.0.0"},"peerDependenciesMeta":{"rollup":{"optional":true}},"devDependencies":{"@rollup/plugin-typescript":"^9.0.1","del-cli":"^5.0.0","rollup":"^3.2.3","source-map":"^0.7.4","typescript":"^4.8.3"},"types":"./types/index.d.ts","ava":{"workerThreads":false,"files":["!**/fixtures/**","!**/helpers/**","!**/recipes/**","!**/types.ts"]},"contributors":[{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},{"name":"Colin Eberhardt","email":"colin.eberhardt@gmail.com"}],"gitHead":"a187c2d50df0596700d6ff35a07a7bda29597061","_id":"@rollup/plugin-wasm@6.0.1","_nodeVersion":"18.11.0","_npmVersion":"8.19.2","dist":{"shasum":"3dc69aac67b6e8e44c17d0a6d8d86d5699031c3a","size":4911,"noattachment":false,"key":"/@rollup/plugin-wasm/-/@rollup/plugin-wasm-6.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@rollup/plugin-wasm/download/@rollup/plugin-wasm-6.0.1.tgz"},"_npmUser":{"name":"shellscape","email":"andrew@shellscape.org"},"directories":{},"maintainers":[{"name":"guybedford","email":"guybedford@gmail.com"},{"name":"lukastaegert","email":"lukas.taegert@tngtech.com"},{"name":"rich_harris","email":""},{"name":"shellscape","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-wasm_6.0.1_1666379485438_0.29916796151425284"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-10-24T09:26:09.118Z","publish_time":1666379485638,"_cnpm_publish_time":1666379485638},"6.0.0":{"name":"@rollup/plugin-wasm","version":"6.0.0","publishConfig":{"access":"public"},"description":"Import WebAssembly code with Rollup","license":"MIT","repository":{"url":"git+https://github.com/rollup/plugins.git","directory":"packages/wasm"},"author":{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},"homepage":"https://github.com/rollup/plugins/tree/master/packages/wasm/#readme","bugs":{"url":"https://github.com/rollup/plugins/issues"},"main":"./dist/cjs/index.js","module":"./dist/es/index.js","exports":{"types":"./types/index.d.ts","import":"./dist/es/index.js","default":"./dist/cjs/index.js"},"engines":{"node":">=14.0.0"},"scripts":{"build":"rollup -c","ci:coverage":"nyc pnpm test && nyc report --reporter=text-lcov > coverage.lcov","ci:lint":"pnpm build && pnpm lint","ci:lint:commits":"commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}","ci:test":"pnpm test -- --verbose","prebuild":"del-cli dist","prepare":"if [ ! -d 'dist' ]; then pnpm build; fi","prerelease":"pnpm build","pretest":"pnpm build","release":"pnpm --workspace-root plugin:release --pkg $npm_package_name","test":"ava","test:ts":"tsc --noEmit"},"keywords":["rollup","plugin","webassembly","import","wasm","wast","wat","emscripten"],"peerDependencies":{"rollup":"^1.20.0||^2.0.0||^3.0.0"},"peerDependenciesMeta":{"rollup":{"optional":true}},"devDependencies":{"@rollup/plugin-typescript":"^8.5.0","del-cli":"^5.0.0","rollup":"^3.0.0-7","source-map":"^0.7.4","typescript":"^4.8.3"},"types":"./types/index.d.ts","ava":{"workerThreads":false,"files":["!**/fixtures/**","!**/helpers/**","!**/recipes/**","!**/types.ts"]},"contributors":[{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},{"name":"Colin Eberhardt","email":"colin.eberhardt@gmail.com"}],"gitHead":"721e6dcbab2624ee7329b781b85ec944eb9e4f1d","_id":"@rollup/plugin-wasm@6.0.0","_nodeVersion":"18.10.0","_npmVersion":"8.19.2","dist":{"shasum":"6d0937a6604eb3c9103cb22c7bff785e2110ec63","size":4911,"noattachment":false,"key":"/@rollup/plugin-wasm/-/@rollup/plugin-wasm-6.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@rollup/plugin-wasm/download/@rollup/plugin-wasm-6.0.0.tgz"},"_npmUser":{"name":"shellscape","email":"andrew@shellscape.org"},"directories":{},"maintainers":[{"name":"guybedford","email":"guybedford@gmail.com"},{"name":"lukastaegert","email":"lukas.taegert@tngtech.com"},{"name":"rich_harris","email":""},{"name":"shellscape","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-wasm_6.0.0_1665422453466_0.9792021059889253"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-10-13T03:37:07.645Z","publish_time":1665422453604,"_cnpm_publish_time":1665422453604},"5.2.0":{"name":"@rollup/plugin-wasm","version":"5.2.0","publishConfig":{"access":"public"},"description":"Import WebAssembly code with Rollup","license":"MIT","repository":{"url":"git+https://github.com/rollup/plugins.git","directory":"packages/wasm"},"author":{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},"homepage":"https://github.com/rollup/plugins/tree/master/packages/wasm/#readme","bugs":{"url":"https://github.com/rollup/plugins/issues"},"main":"dist/index.js","module":"dist/index.es.js","engines":{"node":">=10.0.0"},"scripts":{"build":"rollup -c","ci:coverage":"nyc pnpm test && nyc report --reporter=text-lcov > coverage.lcov","ci:lint":"pnpm build && pnpm lint","ci:lint:commits":"commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}","ci:test":"pnpm test -- --verbose","prebuild":"del-cli dist","prepare":"if [ ! -d 'dist' ]; then pnpm build; fi","prerelease":"pnpm build","pretest":"pnpm build","release":"pnpm plugin:release --workspace-root -- --pkg $npm_package_name","test":"ava","test:ts":"tsc --noEmit"},"keywords":["rollup","plugin","webassembly","import","wasm","wast","wat","emscripten"],"peerDependencies":{"rollup":"^1.20.0 || ^2.0.0"},"devDependencies":{"@rollup/plugin-typescript":"^5.0.2","del-cli":"^3.0.1","rollup":"^2.67.3","source-map":"^0.7.3","typescript":"^4.1.2"},"types":"types/index.d.ts","ava":{"babel":{"compileEnhancements":false},"files":["!**/fixtures/**","!**/helpers/**","!**/recipes/**","!**/types.ts"]},"contributors":[{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},{"name":"Colin Eberhardt","email":"colin.eberhardt@gmail.com"}],"_id":"@rollup/plugin-wasm@5.2.0","_nodeVersion":"14.19.1","_npmVersion":"6.14.16","dist":{"shasum":"2bcd2de23c67b6067b1477566b680d677814a145","size":5276,"noattachment":false,"key":"/@rollup/plugin-wasm/-/@rollup/plugin-wasm-5.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@rollup/plugin-wasm/download/@rollup/plugin-wasm-5.2.0.tgz"},"_npmUser":{"name":"shellscape","email":"andrew@shellscape.org"},"directories":{},"maintainers":[{"name":"guybedford","email":"guybedford@gmail.com"},{"name":"lukastaegert","email":"lukas.taegert@tngtech.com"},{"name":"rich_harris","email":""},{"name":"shellscape","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-wasm_5.2.0_1651275802924_0.6959108951463455"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-04-29T23:43:54.982Z","publish_time":1651275803104,"_cnpm_publish_time":1651275803104},"5.1.2":{"name":"@rollup/plugin-wasm","version":"5.1.2","publishConfig":{"access":"public"},"description":"Import WebAssembly code with Rollup","license":"MIT","repository":{"type":"git","url":"git+https://github.com/rollup/plugins.git"},"author":{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},"homepage":"https://github.com/rollup/plugins/tree/master/packages/wasm/#readme","bugs":{"url":"https://github.com/rollup/plugins/issues"},"main":"dist/index.js","module":"dist/index.es.js","engines":{"node":">=10.0.0"},"scripts":{"build":"rollup -c","ci:coverage":"nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov","ci:lint":"pnpm run build && pnpm run lint","ci:lint:commits":"commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}","ci:test":"pnpm run test -- --verbose","lint":"pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package","lint:docs":"prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md","lint:js":"eslint --fix --cache src test --ext .js,.ts","lint:package":"prettier --write package.json --plugin=prettier-plugin-package","prebuild":"del-cli dist","prepare":"pnpm run build","prepublishOnly":"pnpm run lint","pretest":"pnpm run build","test":"ava"},"keywords":["rollup","plugin","webassembly","import","wasm","wast","wat","emscripten"],"peerDependencies":{"rollup":"^1.20.0 || ^2.0.0"},"devDependencies":{"@rollup/plugin-typescript":"^5.0.2","del-cli":"^3.0.1","rollup":"^2.23.0","source-map":"^0.7.3"},"types":"types/index.d.ts","ava":{"babel":{"compileEnhancements":false},"files":["!**/fixtures/**","!**/helpers/**","!**/recipes/**","!**/types.ts"]},"contributors":[{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},{"name":"Colin Eberhardt","email":"colin.eberhardt@gmail.com"}],"_id":"@rollup/plugin-wasm@5.1.2","_nodeVersion":"12.18.1","_npmVersion":"6.14.5","dist":{"shasum":"5ebd767a14eb7cc98f45aee817e3efbe15c944d8","size":6634,"noattachment":false,"key":"/@rollup/plugin-wasm/-/@rollup/plugin-wasm-5.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@rollup/plugin-wasm/download/@rollup/plugin-wasm-5.1.2.tgz"},"_npmUser":{"name":"shellscape","email":"andrew@shellscape.org"},"directories":{},"maintainers":[{"name":"guybedford","email":"guybedford@gmail.com"},{"name":"lukastaegert","email":"lukas.taegert@tngtech.com"},{"name":"rich_harris","email":""},{"name":"shellscape","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-wasm_5.1.2_1607955824214_0.6388730143641059"},"_hasShrinkwrap":false,"publish_time":1607955824344,"_cnpm_publish_time":1607955824344,"_cnpmcore_publish_time":"2021-12-17T10:01:09.877Z"},"5.1.1":{"name":"@rollup/plugin-wasm","version":"5.1.1","publishConfig":{"access":"public"},"description":"Import WebAssembly code with Rollup","license":"MIT","repository":{"type":"git","url":"git+https://github.com/rollup/plugins.git"},"author":{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},"homepage":"https://github.com/rollup/plugins/tree/master/packages/wasm/#readme","bugs":{"url":"https://github.com/rollup/plugins/issues"},"main":"dist/index.js","module":"dist/index.es.js","engines":{"node":">=10.0.0"},"scripts":{"build":"rollup -c","ci:coverage":"nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov","ci:lint":"pnpm run build && pnpm run lint","ci:lint:commits":"commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}","ci:test":"pnpm run test -- --verbose","lint":"pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package","lint:docs":"prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md","lint:js":"eslint --fix --cache src test --ext .js,.ts","lint:package":"prettier --write package.json --plugin=prettier-plugin-package","prebuild":"del-cli dist","prepare":"pnpm run build","prepublishOnly":"pnpm run lint","pretest":"pnpm run build","test":"ava"},"keywords":["rollup","plugin","webassembly","import","wasm","wast","wat","emscripten"],"peerDependencies":{"rollup":"^1.20.0 || ^2.0.0"},"devDependencies":{"@rollup/plugin-typescript":"^5.0.2","del-cli":"^3.0.1","rollup":"^2.23.0","source-map":"^0.7.3"},"types":"types/index.d.ts","ava":{"babel":{"compileEnhancements":false},"files":["!**/fixtures/**","!**/helpers/**","!**/recipes/**","!**/types.ts"]},"contributors":[{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},{"name":"Colin Eberhardt","email":"colin.eberhardt@gmail.com"}],"_id":"@rollup/plugin-wasm@5.1.1","_nodeVersion":"12.18.1","_npmVersion":"6.14.5","dist":{"shasum":"4de99bb422300ee05e31a428e929fa5ea71d19a5","size":6568,"noattachment":false,"key":"/@rollup/plugin-wasm/-/@rollup/plugin-wasm-5.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@rollup/plugin-wasm/download/@rollup/plugin-wasm-5.1.1.tgz"},"maintainers":[{"name":"guybedford","email":"guybedford@gmail.com"},{"name":"lukastaegert","email":"lukas.taegert@tngtech.com"},{"name":"rich_harris","email":""},{"name":"shellscape","email":""}],"_npmUser":{"name":"shellscape","email":"andrew@shellscape.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-wasm_5.1.1_1603766884098_0.661616745137493"},"_hasShrinkwrap":false,"publish_time":1603766884225,"_cnpm_publish_time":1603766884225,"_cnpmcore_publish_time":"2021-12-17T10:01:10.118Z"},"5.1.0":{"name":"@rollup/plugin-wasm","version":"5.1.0","publishConfig":{"access":"public"},"description":"Import WebAssembly code with Rollup","license":"MIT","repository":{"type":"git","url":"git+https://github.com/rollup/plugins.git"},"author":{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},"homepage":"https://github.com/rollup/plugins/tree/master/packages/wasm/#readme","bugs":{"url":"https://github.com/rollup/plugins/issues"},"main":"dist/index.js","module":"dist/index.es.js","engines":{"node":">=10.0.0"},"scripts":{"build":"rollup -c","ci:coverage":"nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov","ci:lint":"pnpm run build && pnpm run lint","ci:lint:commits":"commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}","ci:test":"pnpm run test -- --verbose","lint":"pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package","lint:docs":"prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md","lint:js":"eslint --fix --cache src test --ext .js,.ts","lint:package":"prettier --write package.json --plugin=prettier-plugin-package","prebuild":"del-cli dist","prepare":"pnpm run build","prepublishOnly":"pnpm run lint","pretest":"pnpm run build","test":"ava"},"keywords":["rollup","plugin","webassembly","import","wasm","wast","wat","emscripten"],"peerDependencies":{"rollup":"^1.20.0 || ^2.0.0"},"devDependencies":{"@rollup/plugin-typescript":"^5.0.2","del-cli":"^3.0.1","rollup":"^2.23.0","source-map":"^0.7.3"},"types":"types/index.d.ts","ava":{"babel":{"compileEnhancements":false},"files":["!**/fixtures/**","!**/helpers/**","!**/recipes/**","!**/types.ts"]},"contributors":[{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},{"name":"Colin Eberhardt","email":"colin.eberhardt@gmail.com"}],"_id":"@rollup/plugin-wasm@5.1.0","_nodeVersion":"12.18.1","_npmVersion":"6.14.5","dist":{"shasum":"7476912f1c72486c1754212fd3e28810a4c475ac","size":6448,"noattachment":false,"key":"/@rollup/plugin-wasm/-/@rollup/plugin-wasm-5.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@rollup/plugin-wasm/download/@rollup/plugin-wasm-5.1.0.tgz"},"maintainers":[{"name":"guybedford","email":"guybedford@gmail.com"},{"name":"lukastaegert","email":"lukas.taegert@tngtech.com"},{"name":"rich_harris","email":""},{"name":"shellscape","email":""}],"_npmUser":{"name":"shellscape","email":"andrew@shellscape.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-wasm_5.1.0_1599673596204_0.4808773493333167"},"_hasShrinkwrap":false,"publish_time":1599673596328,"_cnpm_publish_time":1599673596328,"_cnpmcore_publish_time":"2021-12-17T10:01:10.505Z"},"5.0.0":{"name":"@rollup/plugin-wasm","version":"5.0.0","publishConfig":{"access":"public"},"description":"Import WebAssembly code with Rollup","license":"MIT","repository":{"type":"git","url":"git+https://github.com/rollup/plugins.git"},"author":{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},"homepage":"https://github.com/rollup/plugins/tree/master/packages/wasm/#readme","bugs":{"url":"https://github.com/rollup/plugins/issues"},"main":"dist/index.js","engines":{"node":">=10.0.0"},"scripts":{"build":"rollup -c","ci:coverage":"nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov","ci:lint":"pnpm run build && pnpm run lint","ci:lint:commits":"commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}","ci:test":"pnpm run test -- --verbose","lint":"pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package","lint:docs":"prettier --single-quote --write README.md","lint:js":"eslint --fix --cache src test --ext .js,.ts","lint:package":"prettier --write package.json --plugin=prettier-plugin-package","prebuild":"del-cli dist","prepare":"pnpm run build","prepublishOnly":"pnpm run lint","pretest":"pnpm run build","test":"ava"},"keywords":["rollup","plugin","webassembly","import","wasm","wast","wat","emscripten"],"peerDependencies":{"rollup":"^1.20.0 || ^2.0.0"},"devDependencies":{"@rollup/plugin-typescript":"^4.1.1","del-cli":"^3.0.0","rollup":"^2.0.0","source-map":"^0.7.3"},"ava":{"files":["!**/fixtures/**","!**/helpers/**","!**/recipes/**","!**/types.ts"]},"contributors":[{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},{"name":"Colin Eberhardt","email":"colin.eberhardt@gmail.com"}],"module":"dist/index.es.js","types":"types/index.d.ts","_id":"@rollup/plugin-wasm@5.0.0","_nodeVersion":"14.1.0","_npmVersion":"6.14.4","dist":{"shasum":"3fbcd8b66174467bfb53a95d2435024cacda338d","size":4008,"noattachment":false,"key":"/@rollup/plugin-wasm/-/@rollup/plugin-wasm-5.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@rollup/plugin-wasm/download/@rollup/plugin-wasm-5.0.0.tgz"},"maintainers":[{"name":"guybedford","email":"guybedford@gmail.com"},{"name":"lukastaegert","email":"lukas.taegert@tngtech.com"},{"name":"rich_harris","email":""},{"name":"shellscape","email":""}],"_npmUser":{"name":"shellscape","email":"andrew@shellscape.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-wasm_5.0.0_1589984077460_0.6816929275259198"},"_hasShrinkwrap":false,"publish_time":1589984077638,"_cnpm_publish_time":1589984077638,"_cnpmcore_publish_time":"2021-12-17T10:01:10.743Z"},"4.0.0":{"name":"@rollup/plugin-wasm","version":"4.0.0","publishConfig":{"access":"public"},"description":"Import WebAssembly code with Rollup","license":"MIT","repository":{"type":"git","url":"git+https://github.com/rollup/plugins.git"},"author":{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},"homepage":"https://github.com/rollup/plugins/tree/master/packages/wasm/#readme","bugs":{"url":"https://github.com/rollup/plugins/issues"},"main":"dist/index","scripts":{"build":"rollup -c","ci:coverage":"nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov","ci:lint":"pnpm run build && pnpm run lint","ci:lint:commits":"commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}","ci:test":"pnpm run test -- --verbose","lint":"pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package","lint:docs":"prettier --single-quote --write README.md","lint:js":"eslint --fix --cache src test --ext .js,.ts","lint:package":"prettier --write package.json --plugin=prettier-plugin-package","prebuild":"del-cli dist","prepare":"pnpm run build","prepublishOnly":"pnpm run lint","pretest":"pnpm run build","test":"ava"},"keywords":["rollup","plugin","webassembly","import","wasm","wast","wat","emscripten"],"peerDependencies":{"rollup":"^1.20.0||^2.0.0"},"devDependencies":{"del-cli":"^3.0.0","rollup":"^2.0.0","source-map":"^0.7.3"},"ava":{"files":["!**/fixtures/**","!**/helpers/**","!**/recipes/**","!**/types.ts"]},"contributors":[{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},{"name":"Colin Eberhardt","email":"colin.eberhardt@gmail.com"}],"_id":"@rollup/plugin-wasm@4.0.0","_nodeVersion":"14.1.0","_npmVersion":"6.14.4","dist":{"shasum":"b5ac4713d8bbc958e5781d1f8e5f5e7a896a06fb","size":3666,"noattachment":false,"key":"/@rollup/plugin-wasm/-/@rollup/plugin-wasm-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@rollup/plugin-wasm/download/@rollup/plugin-wasm-4.0.0.tgz"},"maintainers":[{"name":"guybedford","email":"guybedford@gmail.com"},{"name":"lukastaegert","email":"lukas.taegert@tngtech.com"},{"name":"rich_harris","email":""},{"name":"shellscape","email":""}],"_npmUser":{"name":"shellscape","email":"andrew@shellscape.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-wasm_4.0.0_1588459079209_0.6688025073685011"},"_hasShrinkwrap":false,"publish_time":1588459079316,"_cnpm_publish_time":1588459079316,"_cnpmcore_publish_time":"2021-12-17T10:01:10.946Z"},"3.0.0":{"name":"@rollup/plugin-wasm","version":"3.0.0","publishConfig":{"access":"public"},"description":"Import WebAssembly code with Rollup","license":"MIT","repository":{"type":"git","url":"git+https://github.com/rollup/plugins.git"},"author":{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},"homepage":"https://github.com/rollup/plugins/packages/wasm/#readme","bugs":{"url":"https://github.com/rollup/plugins/issues"},"main":"dist/index","scripts":{"build":"rollup -c","ci:coverage":"nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov","ci:coverage:submit":"curl -s https://codecov.io/bash | bash -s - -F beep","ci:lint":"pnpm run build && pnpm run lint && pnpm run security","ci:lint:commits":"commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}","ci:test":"pnpm run test -- --verbose","lint":"pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package","lint:docs":"prettier --single-quote --write README.md","lint:js":"eslint --fix --cache src test","lint:package":"prettier --write package.json --plugin=prettier-plugin-package","prebuild":"del-cli dist","prepare":"npm run build","prepublishOnly":"npm run lint","pretest":"npm run build","security":"echo 'pnpm needs `npm audit` support'","test":"ava"},"keywords":["rollup","plugin","webassembly","import","wasm","wast","wat","emscripten"],"peerDependencies":{"rollup":"^1.20.0"},"devDependencies":{"del-cli":"^3.0.0","rollup":"^1.20.0","source-map":"^0.7.3"},"ava":{"files":["!**/fixtures/**","!**/helpers/**","!**/recipes/**","!**/types.ts"]},"contributors":[{"name":"Jamen Marz","email":"jamenmarz+gh@gmail.com"},{"name":"Colin Eberhardt","email":"colin.eberhardt@gmail.com"}],"_id":"@rollup/plugin-wasm@3.0.0","_nodeVersion":"12.3.1","_npmVersion":"6.11.2","dist":{"shasum":"a757ba29d63621bdb6f4f3dfbb08d6aa2b3fd3ab","size":3632,"noattachment":false,"key":"/@rollup/plugin-wasm/-/@rollup/plugin-wasm-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@rollup/plugin-wasm/download/@rollup/plugin-wasm-3.0.0.tgz"},"maintainers":[{"name":"guybedford","email":"guybedford@gmail.com"},{"name":"lukastaegert","email":"lukas.taegert@tngtech.com"},{"name":"rich_harris","email":""},{"name":"shellscape","email":""}],"_npmUser":{"name":"shellscape","email":"andrew@shellscape.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-wasm_3.0.0_1572439355887_0.5747119507225578"},"_hasShrinkwrap":false,"publish_time":1572439356141,"_cnpm_publish_time":1572439356141,"_cnpmcore_publish_time":"2021-12-17T10:01:11.155Z"}},"readme":"[npm]: https://img.shields.io/npm/v/@rollup/plugin-wasm\n[npm-url]: https://www.npmjs.com/package/@rollup/plugin-wasm\n[size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-wasm\n[size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-wasm\n\n[![npm][npm]][npm-url]\n[![size][size]][size-url]\n[![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)\n\n# @rollup/plugin-wasm\n\n???? A Rollup which allows importing and bundling [WebAssembly modules](http://webassembly.org).\n\nWebAssembly Modules are imported asynchronous as base64 strings. Small modules [can be imported synchronously](#synchronous-modules).\n\n## Requirements\n\nThis plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v14.0.0+) and Rollup v1.20.0+.\n\n## Install\n\nUsing npm:\n\n```console\nnpm install @rollup/plugin-wasm --save-dev\n```\n\n## Usage\n\nCreate a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:\n\n```js\nimport { wasm } from '@rollup/plugin-wasm';\n\nexport default {\n  input: 'src/index.js',\n  output: {\n    dir: 'output',\n    format: 'cjs'\n  },\n  plugins: [wasm()]\n};\n```\n\nThen call `rollup` either via the [CLI](https://www.rollupjs.org/guide/en/#command-line-reference) or the [API](https://www.rollupjs.org/guide/en/#javascript-api).\n\n## Options\n\n### `sync`\n\nType: `Array[...String]`<br>\nDefault: `null`\n\nSpecifies an array of strings that each represent a WebAssembly file to load synchronously. See [Synchronous Modules](#synchronous-modules) for a functional example.\n\n### `maxFileSize`\n\nType: `Number`<br>\nDefault: `14336` (14kb)\n\nThe maximum file size for inline files. If a file exceeds this limit, it will be copied to the destination folder and loaded from a separate file at runtime. If `maxFileSize` is set to `0` all files will be copied.\n\nFiles specified in `sync` to load synchronously are always inlined, regardless of size.\n\n### `fileName`\n\nType: `String`<br>\nDefault: `'[hash][extname]'`\n\nThis option can be used to rename the emitted Wasm files. It accepts the following string replacements:\n\n- `[hash]` - The hash value of the file's contents\n- `[name]` - The name of the imported file (without its file extension)\n- `[extname]` - The extension of the imported file (including the leading `.`)\n\n### `publicPath`\n\nType: `String`<br>\nDefault: (empty string)\n\nA string which will be added in front of filenames when they are not inlined but are copied.\n\n### `targetEnv`\n\nType: `\"auto\" | \"browser\" | \"node\"`<br>\nDefault: `\"auto\"`\n\nConfigures what code is emitted to instantiate the Wasm (both inline and separate):\n\n- `\"auto\"` will determine the environment at runtime and invoke the correct methods accordingly\n- `\"auto-inline\"` always inlines the Wasm and will decode it according to the environment\n- `\"browser\"` omits emitting code that requires node.js builtin modules that may play havoc on downstream bundlers\n- `\"node\"` omits emitting code that requires `fetch`\n\n## Usage\n\nThis plugin looks for `import` statements where the file specifier ends with `.wasm`, such as:\n\n```js\nimport wasm from './example.wasm';\n```\n\nThe WebAssembly is inlined as a base64 encoded string. At runtime the string is decoded and a module is returned.\n\n_Note: The base64 string that represents the WebAssembly within the bundle will be ~33% larger than the original file._\n\nWhen bundled, `wasm` is a function you can use to instantiate the functionality inside of the WebAssembly module. This function returns a promise, so you can instantiate the module like this:\n\n```js\nimport wasm from './example.wasm';\n\nwasm().then(({ instance }) => {\n  // use instance\n});\n\n// or use top-level await\nconst { instance } = await wasm();\n```\n\nThe promise returns an object with an `instance` property that is a [`WebAssembly.Module`](https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/Module) object that you can use to interact with the WebAssembly module.\n\nFor example, given the following simple C file:\n\n```c\nint main() {\n  return 42;\n}\n```\n\nCompile the file using `emscripten`, or the online [WasmFiddle](https://wasdk.github.io/WasmFiddle/) tool. Then import and instantiate the resulting file:\n\n```js\nimport sample from './sample.wasm';\n\nsample().then(({ instance }) => {\n  console.log(instance.exports.main());\n});\n```\n\n### Passing Imports and Memory\n\nIf you'd like to pass any imports or memory into your WebAssembly module, you can do so by passing those as arguments to the WebAssembly loader function, like this:\n\n```js\nimport sample from './sample.wasm';\n\nconst memory = new WebAssembly.Memory({ initial: 10, maximum: 100 });\n\nconst options = {\n  js: {\n    mem: memory\n  },\n  imports: {\n    log: (arg) => console.log(arg)\n  }\n};\n\nsample(options).then(({ instance }) => {\n  console.log(instance.exports.main());\n});\n```\n\nBecause this example passes in `imports`, the `instance` becomes an instance of [`WebAssembly.Instance`](https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/Instance) and gives the WebAssembly code access to the imports and memory from JavaScript.\n\n\\_\\_Note: Just passing in memory will result in a `WebAssembly.Module` as `instance`; it's only `imports` that triggers the creation of `WebAssembly.Instance`.\n\n### Using with wasm-bindgen and wasm-pack\n\nIf you are writing Rust code and using [`wasm-bindgen`](https://github.com/rustwasm/wasm-bindgen) or [`wasm-pack`](https://github.com/rustwasm/wasm-pack), you'll need to use a different process for instantiating your WebAssembly modules. Because WebAssembly files generated by these tools require specific imports, you cannot provide these yourself.\n\nThe best setting to use with `wasm-bindgen` or `wasm-pack` is `--target web`. This will generate your WebAssembly files (such as `sample_bg.wasm`) with a JavaScript wrapper (such as `sample.js`). The JavaScript wrapper contains all of the instantiation code you'll need.\n\nYou'll need to import both the JavaScript file and the WebAssembly file into your project. Then, run the WebAssembly loading function and pass that into the `init()` function from the JavaScript file. Here's an example:\n\n```js\nimport init, { main } from '../build/sample.js';\nimport sample from '../build/sample_bg.wasm';\n\nsample()\n  .then({ instance } => init(instance))\n  .then(() => main());\n\n// or using top-level await\n\nawait init(await sample());\nmain();\n```\n\nUnlike with the `emscripten` example, you'll need to import the methods you want to use directly from the JavaScript file rather than accessing them on the `WebAssembly.Instance`.\n\n### Synchronous Modules\n\nJavaScript runtimes allow small modules (< 4KB) to be compiled synchronously. If you'd like to specify some files to be compiled synchronously, you can do so in your `rollup.config.js` file.\n\n```js\nimport { wasm } from '@rollup/plugin-wasm';\n\nexport default {\n  input: 'src/index.js',\n  output: {\n    dir: 'output',\n    format: 'cjs'\n  },\n  plugins: [\n    wasm({\n      sync: ['web/sample.wasm', 'web/foobar.wasm']\n    });\n  ]\n};\n```\n\nSynchronous modules return a synchronous loader function that returns either a `WebAssembly.Module` or `WebAssembly.Instance` directly (not a promise). So you can use the module directly, like this:\n\n```js\nimport sample from './sample.wasm';\n\nconst instance = sample({ ...imports });\n\nconsole.log(instance.exports.main());\n```\n\n## Meta\n\n[CONTRIBUTING](/.github/CONTRIBUTING.md)\n\n[LICENSE (MIT)](/LICENSE)\n","_attachments":{},"homepage":"https://github.com/rollup/plugins/tree/master/packages/wasm/#readme","bugs":{"url":"https://github.com/rollup/plugins/issues"},"license":"MIT"}