{"_id":"componentize-qjs","_rev":"11-95d089cce901adf75767b080065e2275","name":"componentize-qjs","dist-tags":{"latest":"0.5.0"},"versions":{"0.2.0":{"name":"componentize-qjs","version":"0.2.0","license":"Apache-2.0","_id":"componentize-qjs@0.2.0","maintainers":[{"name":"andreiltd","email":"andreiltd@gmail.com"}],"homepage":"https://github.com/andreiltd/componentize-qjs","bugs":{"url":"https://github.com/andreiltd/componentize-qjs/issues"},"bin":{"componentize-qjs":"bin/componentize-qjs"},"dist":{"shasum":"405656dff4eaa225c347287ce65659217db0df59","tarball":"https://registry.npmjs.org/componentize-qjs/-/componentize-qjs-0.2.0.tgz","fileCount":5,"integrity":"sha512-qbiNsdlv61eGq4YPQGQURNzB8aViwruhIIfmaQtLB3kDvbyhU+JtiFewyrsLolnhkx2cbyfHE1T5M2NyvXw4Og==","signatures":[{"sig":"MEYCIQDQfmuDq8oNrpWR0fWs599owqPuWpx1OL71iz0f1smOKwIhAPZcwACJfKUmCmDwyyAzH45wZPDYAmNv51H3V1+Z1hkc","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/componentize-qjs@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":29101},"main":"index.js","napi":{"targets":["x86_64-apple-darwin","aarch64-apple-darwin","x86_64-unknown-linux-gnu","aarch64-unknown-linux-gnu","x86_64-unknown-linux-musl","aarch64-unknown-linux-musl","x86_64-pc-windows-msvc","aarch64-pc-windows-msvc"],"binaryName":"componentize-qjs","packageName":"@andreiltd/componentize-qjs-binding"},"types":"index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"b5603e744fef03e8739dcf8a3a48b574611bda0b","scripts":{"test":"vitest run --dir ./test","build":"npm run build:release","build:debug":"napi build --manifest-path ../napi/Cargo.toml --platform --js index.js --dts index.d.ts -o .","build:release":"napi build --manifest-path ../napi/Cargo.toml --platform --js index.js --dts index.d.ts -o . --release"},"_npmUser":{"name":"andreiltd","email":"andreiltd@gmail.com"},"repository":{"url":"git+https://github.com/andreiltd/componentize-qjs.git","type":"git","directory":"npm"},"_npmVersion":"11.11.0","description":"Convert JavaScript to WebAssembly components using QuickJS","directories":{},"_nodeVersion":"24.14.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.0","@napi-rs/cli":"^3"},"optionalDependencies":{"@andreiltd/componentize-qjs-binding-darwin-x64":"0.2.0","@andreiltd/componentize-qjs-binding-darwin-arm64":"0.2.0","@andreiltd/componentize-qjs-binding-linux-x64-gnu":"0.2.0","@andreiltd/componentize-qjs-binding-linux-x64-musl":"0.2.0","@andreiltd/componentize-qjs-binding-win32-x64-msvc":"0.2.0","@andreiltd/componentize-qjs-binding-linux-arm64-gnu":"0.2.0","@andreiltd/componentize-qjs-binding-linux-arm64-musl":"0.2.0","@andreiltd/componentize-qjs-binding-win32-arm64-msvc":"0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/componentize-qjs_0.2.0_1778015012975_0.34673878125508684","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"componentize-qjs","version":"0.2.1","license":"Apache-2.0","_id":"componentize-qjs@0.2.1","maintainers":[{"name":"andreiltd","email":"andreiltd@gmail.com"}],"homepage":"https://github.com/andreiltd/componentize-qjs","bugs":{"url":"https://github.com/andreiltd/componentize-qjs/issues"},"bin":{"componentize-qjs":"bin/componentize-qjs"},"dist":{"shasum":"cec4819767b809b36e37494d4c5bc7e533eea431","tarball":"https://registry.npmjs.org/componentize-qjs/-/componentize-qjs-0.2.1.tgz","fileCount":7,"integrity":"sha512-6TWWc+s4YwjPrCRXSyf6J+AF6cbaZzjtxunCu+vAUI/ZA4OTVEYyEl3MxokLChQb2iuwXb2SLxhv+vjlkQDl/g==","signatures":[{"sig":"MEYCIQDj96O/GaVaCuASyC+rwYoTMnnJ3gUFEmtRI7S5qL4y5gIhANj1KrMxdSw9IQfQXt4pJTG3D0NEkMQes+UD47JTE+Wu","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/componentize-qjs@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":51318},"main":"index.js","napi":{"targets":["x86_64-apple-darwin","aarch64-apple-darwin","x86_64-unknown-linux-gnu","aarch64-unknown-linux-gnu","x86_64-unknown-linux-musl","aarch64-unknown-linux-musl","x86_64-pc-windows-msvc","aarch64-pc-windows-msvc"],"binaryName":"componentize-qjs","packageName":"@andreiltd/componentize-qjs-binding"},"types":"index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"4658e8eb77548ca6553f0a6034910c8dfa5f178e","scripts":{"test":"vitest run --dir ./test","build":"npm run build:release","build:debug":"napi build --manifest-path ../napi/Cargo.toml --platform --js index.js --dts index.d.ts -o .","build:release":"napi build --manifest-path ../napi/Cargo.toml --platform --js index.js --dts index.d.ts -o . --release"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:a4a974b0-4ef0-43fc-a9d6-158765aeeb95"}},"repository":{"url":"git+https://github.com/andreiltd/componentize-qjs.git","type":"git","directory":"npm"},"_npmVersion":"11.14.1","description":"Convert JavaScript to WebAssembly components using QuickJS","directories":{},"_nodeVersion":"24.14.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.0","@napi-rs/cli":"^3"},"optionalDependencies":{"@andreiltd/componentize-qjs-binding-darwin-x64":"0.2.1","@andreiltd/componentize-qjs-binding-darwin-arm64":"0.2.1","@andreiltd/componentize-qjs-binding-linux-x64-gnu":"0.2.1","@andreiltd/componentize-qjs-binding-linux-x64-musl":"0.2.1","@andreiltd/componentize-qjs-binding-win32-x64-msvc":"0.2.1","@andreiltd/componentize-qjs-binding-linux-arm64-gnu":"0.2.1","@andreiltd/componentize-qjs-binding-linux-arm64-musl":"0.2.1","@andreiltd/componentize-qjs-binding-win32-arm64-msvc":"0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/componentize-qjs_0.2.1_1778663503799_0.2643425311480654","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"componentize-qjs","version":"0.2.2","license":"Apache-2.0","_id":"componentize-qjs@0.2.2","maintainers":[{"name":"andreiltd","email":"andreiltd@gmail.com"}],"homepage":"https://github.com/andreiltd/componentize-qjs","bugs":{"url":"https://github.com/andreiltd/componentize-qjs/issues"},"bin":{"componentize-qjs":"bin/componentize-qjs"},"dist":{"shasum":"aeb87fb3f64bec4509b1734cfc3087f1b0145325","tarball":"https://registry.npmjs.org/componentize-qjs/-/componentize-qjs-0.2.2.tgz","fileCount":7,"integrity":"sha512-WwsBobRbThcn0MKZnczc4SP2UWbbMdqYncJ4qlIlDWfKW2KU/1EpCzu0sJXE4s+0r3MuLqYc+xhqEdWpElkRFA==","signatures":[{"sig":"MEUCIGZHbgalhURraAefKGAuFubW+G3EeIzAvh0imxvQxE19AiEAmbsFIsP95hiQyvQstNtD4pGet30+ThoC1TU3uBr+HDw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/componentize-qjs@0.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":51318},"main":"index.js","napi":{"targets":["x86_64-apple-darwin","aarch64-apple-darwin","x86_64-unknown-linux-gnu","aarch64-unknown-linux-gnu","x86_64-unknown-linux-musl","aarch64-unknown-linux-musl","x86_64-pc-windows-msvc","aarch64-pc-windows-msvc"],"binaryName":"componentize-qjs","packageName":"@andreiltd/componentize-qjs-binding"},"types":"index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"f8938aa5731655d3150253f525dc70f9ec4ada20","scripts":{"test":"vitest run --dir ./test","build":"npm run build:release","build:debug":"napi build --manifest-path ../napi/Cargo.toml --platform --js index.js --dts index.d.ts -o .","build:release":"napi build --manifest-path ../napi/Cargo.toml --platform --js index.js --dts index.d.ts -o . --release"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:a4a974b0-4ef0-43fc-a9d6-158765aeeb95"}},"repository":{"url":"git+https://github.com/andreiltd/componentize-qjs.git","type":"git","directory":"npm"},"_npmVersion":"11.15.0","description":"Convert JavaScript to WebAssembly components using QuickJS","directories":{},"_nodeVersion":"24.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.0","@napi-rs/cli":"^3"},"optionalDependencies":{"@andreiltd/componentize-qjs-binding-darwin-x64":"0.2.2","@andreiltd/componentize-qjs-binding-darwin-arm64":"0.2.2","@andreiltd/componentize-qjs-binding-linux-x64-gnu":"0.2.2","@andreiltd/componentize-qjs-binding-linux-x64-musl":"0.2.2","@andreiltd/componentize-qjs-binding-win32-x64-msvc":"0.2.2","@andreiltd/componentize-qjs-binding-linux-arm64-gnu":"0.2.2","@andreiltd/componentize-qjs-binding-linux-arm64-musl":"0.2.2","@andreiltd/componentize-qjs-binding-win32-arm64-msvc":"0.2.2"},"_npmOperationalInternal":{"tmp":"tmp/componentize-qjs_0.2.2_1779884359272_0.48327032122983704","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"componentize-qjs","version":"0.3.0","license":"Apache-2.0","_id":"componentize-qjs@0.3.0","maintainers":[{"name":"andreiltd","email":"andreiltd@gmail.com"}],"homepage":"https://github.com/andreiltd/componentize-qjs","bugs":{"url":"https://github.com/andreiltd/componentize-qjs/issues"},"bin":{"componentize-qjs":"bin/componentize-qjs"},"dist":{"shasum":"ce76e3c255728e6443433e425b86d9b8a5e8880f","tarball":"https://registry.npmjs.org/componentize-qjs/-/componentize-qjs-0.3.0.tgz","fileCount":7,"integrity":"sha512-nE8TO/CTSeUrXEWy55HsinNnbd4YtlnlbzAqbKfu40ms2ng0cYaFgUOIP1CpwI1McknpZ7PbstlRaiR8iep9IQ==","signatures":[{"sig":"MEQCIEZ36XKdASnUWnA1ADmsndJJU3hepx5nHSJZPULjjl0XAiBL6ajP7NTK0T89MAgMX8f4EM/4UPxVErO23/dHs3azGA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/componentize-qjs@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":52571},"main":"index.js","napi":{"targets":["x86_64-apple-darwin","aarch64-apple-darwin","x86_64-unknown-linux-gnu","aarch64-unknown-linux-gnu","x86_64-unknown-linux-musl","aarch64-unknown-linux-musl","x86_64-pc-windows-msvc","aarch64-pc-windows-msvc"],"binaryName":"componentize-qjs","packageName":"@andreiltd/componentize-qjs-binding"},"types":"index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"2106b42325b4b703b033570183a63c0c0f07c1a9","scripts":{"test":"vitest run --dir ./test","build":"npm run build:release","build:debug":"napi build --manifest-path ../napi/Cargo.toml --platform --js index.js --dts index.d.ts -o .","build:release":"napi build --manifest-path ../napi/Cargo.toml --platform --js index.js --dts index.d.ts -o . --release"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:aa0e0bb5-a0c4-4d26-aa73-9ecff4a645a4"}},"repository":{"url":"git+https://github.com/andreiltd/componentize-qjs.git","type":"git","directory":"npm"},"_npmVersion":"11.16.0","description":"Convert JavaScript to WebAssembly components using QuickJS","directories":{},"_nodeVersion":"24.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.0","@napi-rs/cli":"^3"},"optionalDependencies":{"@andreiltd/componentize-qjs-binding-darwin-x64":"0.3.0","@andreiltd/componentize-qjs-binding-darwin-arm64":"0.3.0","@andreiltd/componentize-qjs-binding-linux-x64-gnu":"0.3.0","@andreiltd/componentize-qjs-binding-linux-x64-musl":"0.3.0","@andreiltd/componentize-qjs-binding-win32-x64-msvc":"0.3.0","@andreiltd/componentize-qjs-binding-linux-arm64-gnu":"0.3.0","@andreiltd/componentize-qjs-binding-linux-arm64-musl":"0.3.0","@andreiltd/componentize-qjs-binding-win32-arm64-msvc":"0.3.0"},"_npmOperationalInternal":{"tmp":"tmp/componentize-qjs_0.3.0_1781085260553_0.3351383254112097","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"componentize-qjs","version":"0.4.0","license":"Apache-2.0","_id":"componentize-qjs@0.4.0","maintainers":[{"name":"andreiltd","email":"andreiltd@gmail.com"}],"homepage":"https://github.com/andreiltd/componentize-qjs","bugs":{"url":"https://github.com/andreiltd/componentize-qjs/issues"},"bin":{"componentize-qjs":"bin/componentize-qjs"},"dist":{"shasum":"7bffc1d14328633026faf511fb27cd4a7e0fb1f8","tarball":"https://registry.npmjs.org/componentize-qjs/-/componentize-qjs-0.4.0.tgz","fileCount":7,"integrity":"sha512-WDhMXQjJjm8YgmTaqs18uNL/atX5NBVO/rRdpzVXuTFwi7yuM/cJXN/aUk5UcGkk/Ku4imP5bWBI1Gu7nrbDsA==","signatures":[{"sig":"MEQCIDXgNtTyFgFZKh+hpnCVALSDN2KknmugvMei2Kz2AKKlAiBpDktrLB33iEPOAen7ni1F5iSRHfW/9wJRHMRZ7dpp5w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/componentize-qjs@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":54346},"main":"index.js","napi":{"targets":["x86_64-apple-darwin","aarch64-apple-darwin","x86_64-unknown-linux-gnu","aarch64-unknown-linux-gnu","x86_64-unknown-linux-musl","aarch64-unknown-linux-musl","x86_64-pc-windows-msvc","aarch64-pc-windows-msvc"],"binaryName":"componentize-qjs","packageName":"@andreiltd/componentize-qjs-binding"},"types":"index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"705fc442f73b86457f90e2077173cd89e71b2254","scripts":{"test":"vitest run --dir ./test","build":"npm run build:release","build:debug":"napi build --manifest-path ../napi/Cargo.toml --platform --js index.js --dts index.d.ts -o .","build:release":"napi build --manifest-path ../napi/Cargo.toml --platform --js index.js --dts index.d.ts -o . --release"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2bd5abab-9883-4085-b6bb-e19658ed71e0"}},"repository":{"url":"git+https://github.com/andreiltd/componentize-qjs.git","type":"git","directory":"npm"},"_npmVersion":"11.17.0","description":"Convert JavaScript to WebAssembly components using QuickJS","directories":{},"_nodeVersion":"24.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.0","@napi-rs/cli":"^3"},"optionalDependencies":{"@andreiltd/componentize-qjs-binding-darwin-x64":"0.4.0","@andreiltd/componentize-qjs-binding-darwin-arm64":"0.4.0","@andreiltd/componentize-qjs-binding-linux-x64-gnu":"0.4.0","@andreiltd/componentize-qjs-binding-linux-x64-musl":"0.4.0","@andreiltd/componentize-qjs-binding-win32-x64-msvc":"0.4.0","@andreiltd/componentize-qjs-binding-linux-arm64-gnu":"0.4.0","@andreiltd/componentize-qjs-binding-linux-arm64-musl":"0.4.0","@andreiltd/componentize-qjs-binding-win32-arm64-msvc":"0.4.0"},"_npmOperationalInternal":{"tmp":"tmp/componentize-qjs_0.4.0_1781623619816_0.17292880642815756","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"componentize-qjs","version":"0.4.1","license":"Apache-2.0","_id":"componentize-qjs@0.4.1","maintainers":[{"name":"andreiltd","email":"andreiltd@gmail.com"}],"homepage":"https://github.com/andreiltd/componentize-qjs","bugs":{"url":"https://github.com/andreiltd/componentize-qjs/issues"},"bin":{"componentize-qjs":"bin/componentize-qjs"},"dist":{"shasum":"443d50a7d931e15224ccfcd066fd19107d8af9fc","tarball":"https://registry.npmjs.org/componentize-qjs/-/componentize-qjs-0.4.1.tgz","fileCount":7,"integrity":"sha512-DZokwJYGrH1N+4HYl2HJ5wJVD/lCsJNWHU1TqxqHRdcMWxYNJ8+4iFULlWyU2ZNwd/XMoprjGVrO1AnapgKeDA==","signatures":[{"sig":"MEUCIHwbUFPcWQgmaj9H7Nf0UJs/9mYXSjkdoD5VXmO65RSxAiEAttwYmJT4dkskqc/z39ZR0zEdRk/i+/TTHEnQ7MomSD4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/componentize-qjs@0.4.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":54346},"main":"index.js","napi":{"targets":["x86_64-apple-darwin","aarch64-apple-darwin","x86_64-unknown-linux-gnu","aarch64-unknown-linux-gnu","x86_64-unknown-linux-musl","aarch64-unknown-linux-musl","x86_64-pc-windows-msvc","aarch64-pc-windows-msvc"],"binaryName":"componentize-qjs","packageName":"@andreiltd/componentize-qjs-binding"},"types":"index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"6a444cd852272fa180f21675b359282cebaaba5c","scripts":{"test":"vitest run --dir ./test","build":"npm run build:release","build:debug":"napi build --manifest-path ../napi/Cargo.toml --platform --js index.js --dts index.d.ts -o .","build:release":"napi build --manifest-path ../napi/Cargo.toml --platform --js index.js --dts index.d.ts -o . --release"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2bd5abab-9883-4085-b6bb-e19658ed71e0"}},"repository":{"url":"git+https://github.com/andreiltd/componentize-qjs.git","type":"git","directory":"npm"},"_npmVersion":"11.17.0","description":"Convert JavaScript to WebAssembly components using QuickJS","directories":{},"_nodeVersion":"24.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.0","@napi-rs/cli":"^3"},"optionalDependencies":{"@andreiltd/componentize-qjs-binding-darwin-x64":"0.4.1","@andreiltd/componentize-qjs-binding-darwin-arm64":"0.4.1","@andreiltd/componentize-qjs-binding-linux-x64-gnu":"0.4.1","@andreiltd/componentize-qjs-binding-linux-x64-musl":"0.4.1","@andreiltd/componentize-qjs-binding-win32-x64-msvc":"0.4.1","@andreiltd/componentize-qjs-binding-linux-arm64-gnu":"0.4.1","@andreiltd/componentize-qjs-binding-linux-arm64-musl":"0.4.1","@andreiltd/componentize-qjs-binding-win32-arm64-msvc":"0.4.1"},"_npmOperationalInternal":{"tmp":"tmp/componentize-qjs_0.4.1_1781795315521_0.603540912287658","host":"s3://npm-registry-packages-npm-production"}},"0.4.2":{"name":"componentize-qjs","version":"0.4.2","license":"Apache-2.0","_id":"componentize-qjs@0.4.2","maintainers":[{"name":"andreiltd","email":"andreiltd@gmail.com"}],"homepage":"https://github.com/andreiltd/componentize-qjs","bugs":{"url":"https://github.com/andreiltd/componentize-qjs/issues"},"bin":{"componentize-qjs":"bin/componentize-qjs"},"dist":{"shasum":"4d9707a7776e9b89c1a5d5cd76a412df3a298498","tarball":"https://registry.npmjs.org/componentize-qjs/-/componentize-qjs-0.4.2.tgz","fileCount":7,"integrity":"sha512-SZH9zefXiHd0dp8I7pVrzhXDrRSDIx58Pj6lA6cC66Q8oiHNDdgXX14jffnojN5C5iHQcs0KQeVk8Srf0oYV6A==","signatures":[{"sig":"MEYCIQCN7vvGxtOLF64QGRMZkNKp+UnDQreqYWf39KtEoBiOmQIhAPCyvVzzNN2wS72Va9eFfA3/ujUHbKIysbTboJylHBB0","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/componentize-qjs@0.4.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":54346},"main":"index.js","napi":{"targets":["x86_64-apple-darwin","aarch64-apple-darwin","x86_64-unknown-linux-gnu","aarch64-unknown-linux-gnu","x86_64-unknown-linux-musl","aarch64-unknown-linux-musl","x86_64-pc-windows-msvc","aarch64-pc-windows-msvc"],"binaryName":"componentize-qjs","packageName":"@andreiltd/componentize-qjs-binding"},"types":"index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"cea7b3e173356d89779e576f545bd1d1c0f03ad1","scripts":{"test":"vitest run --dir ./test","build":"npm run build:release","build:debug":"napi build --manifest-path ../napi/Cargo.toml --platform --js index.js --dts index.d.ts -o .","build:release":"napi build --manifest-path ../napi/Cargo.toml --platform --js index.js --dts index.d.ts -o . --release"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2bd5abab-9883-4085-b6bb-e19658ed71e0"}},"repository":{"url":"git+https://github.com/andreiltd/componentize-qjs.git","type":"git","directory":"npm"},"_npmVersion":"11.18.0","description":"Convert JavaScript to WebAssembly components using QuickJS","directories":{},"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.0","@napi-rs/cli":"^3"},"optionalDependencies":{"@andreiltd/componentize-qjs-binding-darwin-x64":"0.4.2","@andreiltd/componentize-qjs-binding-darwin-arm64":"0.4.2","@andreiltd/componentize-qjs-binding-linux-x64-gnu":"0.4.2","@andreiltd/componentize-qjs-binding-linux-x64-musl":"0.4.2","@andreiltd/componentize-qjs-binding-win32-x64-msvc":"0.4.2","@andreiltd/componentize-qjs-binding-linux-arm64-gnu":"0.4.2","@andreiltd/componentize-qjs-binding-linux-arm64-musl":"0.4.2","@andreiltd/componentize-qjs-binding-win32-arm64-msvc":"0.4.2"},"_npmOperationalInternal":{"tmp":"tmp/componentize-qjs_0.4.2_1783697268946_0.6933868144867525","host":"s3://npm-registry-packages-npm-production"}},"0.4.3":{"name":"componentize-qjs","version":"0.4.3","license":"Apache-2.0","_id":"componentize-qjs@0.4.3","maintainers":[{"name":"andreiltd","email":"andreiltd@gmail.com"}],"homepage":"https://github.com/andreiltd/componentize-qjs","bugs":{"url":"https://github.com/andreiltd/componentize-qjs/issues"},"bin":{"componentize-qjs":"bin/componentize-qjs"},"dist":{"shasum":"f48fbbceb5b700a12139a2bb17fcb3d5209de0e8","tarball":"https://registry.npmjs.org/componentize-qjs/-/componentize-qjs-0.4.3.tgz","fileCount":7,"integrity":"sha512-fiOm2Yu33XIDxY9zkzpTfR+gx3kXsmH9UPWPxuR484bVZGMfq12/Yh5HDHkEvpqZwZt2FDgo/Cj7VUIDX0LJEw==","signatures":[{"sig":"MEUCIHXJP/n/0CCCqvuFfYxvb+KDS+ua3FRr2pwKZaRuHqA6AiEA9U+MdhBYHOb0lWRjWYGRG1sW/FHbONxKfbYdrc6vcUg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/componentize-qjs@0.4.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":55462},"main":"index.js","napi":{"targets":["x86_64-apple-darwin","aarch64-apple-darwin","x86_64-unknown-linux-gnu","aarch64-unknown-linux-gnu","x86_64-unknown-linux-musl","aarch64-unknown-linux-musl","x86_64-pc-windows-msvc","aarch64-pc-windows-msvc"],"binaryName":"componentize-qjs","packageName":"@andreiltd/componentize-qjs-binding"},"types":"index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"2b398ffcd6f91cb3f46df7f036090159a4583d71","scripts":{"test":"vitest run --dir ./test","build":"npm run build:release","build:debug":"napi build --manifest-path ../napi/Cargo.toml --platform --js index.js --dts index.d.ts -o .","build:release":"napi build --manifest-path ../napi/Cargo.toml --platform --js index.js --dts index.d.ts -o . --release"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2bd5abab-9883-4085-b6bb-e19658ed71e0"}},"repository":{"url":"git+https://github.com/andreiltd/componentize-qjs.git","type":"git","directory":"npm"},"_npmVersion":"11.18.0","description":"Convert JavaScript to WebAssembly components using QuickJS","directories":{},"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.0","@napi-rs/cli":"^3"},"optionalDependencies":{"@andreiltd/componentize-qjs-binding-darwin-x64":"0.4.3","@andreiltd/componentize-qjs-binding-darwin-arm64":"0.4.3","@andreiltd/componentize-qjs-binding-linux-x64-gnu":"0.4.3","@andreiltd/componentize-qjs-binding-linux-x64-musl":"0.4.3","@andreiltd/componentize-qjs-binding-win32-x64-msvc":"0.4.3","@andreiltd/componentize-qjs-binding-linux-arm64-gnu":"0.4.3","@andreiltd/componentize-qjs-binding-linux-arm64-musl":"0.4.3","@andreiltd/componentize-qjs-binding-win32-arm64-msvc":"0.4.3"},"_npmOperationalInternal":{"tmp":"tmp/componentize-qjs_0.4.3_1784997470904_0.0750357014048062","host":"s3://npm-registry-packages-npm-production"}},"0.4.4":{"name":"componentize-qjs","version":"0.4.4","license":"Apache-2.0","_id":"componentize-qjs@0.4.4","maintainers":[{"name":"andreiltd","email":"andreiltd@gmail.com"}],"homepage":"https://github.com/andreiltd/componentize-qjs","bugs":{"url":"https://github.com/andreiltd/componentize-qjs/issues"},"bin":{"componentize-qjs":"bin/componentize-qjs"},"dist":{"shasum":"4a4018735a3bc493b6af9a7d5ecc20232a5d01fe","tarball":"https://registry.npmjs.org/componentize-qjs/-/componentize-qjs-0.4.4.tgz","fileCount":7,"integrity":"sha512-2mSESiFGKi8IadH2kcEkMvaawZD2HpSWSb/ibnsc2+9XxOlh5CDG0jDi+Y5a50xclkU647ZtPrC64Kf+h1EjgA==","signatures":[{"sig":"MEYCIQDqtNP9fayHL8RO6HZ/nMhhcklL04DxBp0snj6G5qWULwIhAOrYfRfDAWn/FPWB7uf5dMf4A7G1TDUSVvL3sFOVWP9Y","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/componentize-qjs@0.4.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":60292},"main":"index.js","napi":{"targets":["x86_64-apple-darwin","aarch64-apple-darwin","x86_64-unknown-linux-gnu","aarch64-unknown-linux-gnu","x86_64-unknown-linux-musl","aarch64-unknown-linux-musl","x86_64-pc-windows-msvc","aarch64-pc-windows-msvc"],"binaryName":"componentize-qjs","packageName":"@andreiltd/componentize-qjs-binding"},"types":"index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"b94852190f55072655df735147b66c9a5e0f30f9","scripts":{"test":"vitest run --dir ./test","build":"npm run build:release","build:debug":"napi build --manifest-path ../napi/Cargo.toml --platform --js index.js --dts index.d.ts -o .","build:release":"napi build --manifest-path ../napi/Cargo.toml --platform --js index.js --dts index.d.ts -o . --release"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2bd5abab-9883-4085-b6bb-e19658ed71e0"}},"repository":{"url":"git+https://github.com/andreiltd/componentize-qjs.git","type":"git","directory":"npm"},"_npmVersion":"11.19.1","description":"Convert JavaScript to WebAssembly components using QuickJS","directories":{},"_nodeVersion":"24.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.0","@napi-rs/cli":"^3"},"optionalDependencies":{"@andreiltd/componentize-qjs-binding-darwin-x64":"0.4.4","@andreiltd/componentize-qjs-binding-darwin-arm64":"0.4.4","@andreiltd/componentize-qjs-binding-linux-x64-gnu":"0.4.4","@andreiltd/componentize-qjs-binding-linux-x64-musl":"0.4.4","@andreiltd/componentize-qjs-binding-win32-x64-msvc":"0.4.4","@andreiltd/componentize-qjs-binding-linux-arm64-gnu":"0.4.4","@andreiltd/componentize-qjs-binding-linux-arm64-musl":"0.4.4","@andreiltd/componentize-qjs-binding-win32-arm64-msvc":"0.4.4"},"_npmOperationalInternal":{"tmp":"tmp/componentize-qjs_0.4.4_1788362939891_0.08661476080951469","host":"s3://npm-registry-packages-npm-production"}},"0.4.5":{"name":"componentize-qjs","version":"0.4.5","license":"Apache-2.0","_id":"componentize-qjs@0.4.5","maintainers":[{"name":"andreiltd","email":"andreiltd@gmail.com"}],"homepage":"https://github.com/andreiltd/componentize-qjs","bugs":{"url":"https://github.com/andreiltd/componentize-qjs/issues"},"bin":{"componentize-qjs":"bin/componentize-qjs"},"dist":{"shasum":"8704d7079f966a08a22c5c3f98fec53292998179","tarball":"https://registry.npmjs.org/componentize-qjs/-/componentize-qjs-0.4.5.tgz","fileCount":7,"integrity":"sha512-/Brt+/Ps7DQ1mYuUsDISTQTFSaZfCSoRHkHnh9Dm5WHCO6arc/vzVdD8TXssfyNex2Iv3UR8NHdahsqABPDh0w==","signatures":[{"sig":"MEQCIAvA4as001bzNhp8ZdWgbL6PubYyqq6INiVyQLi0E7KZAiB3ylgrl34KOAvIWnPTSSXdGVGtXDUyH7nIe3kxkYb41g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/componentize-qjs@0.4.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":61900},"main":"index.js","napi":{"targets":["x86_64-apple-darwin","aarch64-apple-darwin","x86_64-unknown-linux-gnu","aarch64-unknown-linux-gnu","x86_64-unknown-linux-musl","aarch64-unknown-linux-musl","x86_64-pc-windows-msvc","aarch64-pc-windows-msvc"],"binaryName":"componentize-qjs","packageName":"@andreiltd/componentize-qjs-binding"},"types":"index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"e563c6d6ae50b087980414015663ca9c948c09bb","scripts":{"test":"vitest run --dir ./test","build":"npm run build:release","build:debug":"napi build --manifest-path ../napi/Cargo.toml --platform --js index.js --dts index.d.ts -o .","build:release":"napi build --manifest-path ../napi/Cargo.toml --platform --js index.js --dts index.d.ts -o . --release"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2bd5abab-9883-4085-b6bb-e19658ed71e0"}},"repository":{"url":"git+https://github.com/andreiltd/componentize-qjs.git","type":"git","directory":"npm"},"_npmVersion":"11.19.1","description":"Convert JavaScript to WebAssembly components using QuickJS","directories":{},"_nodeVersion":"24.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.0","@napi-rs/cli":"^3"},"optionalDependencies":{"@andreiltd/componentize-qjs-binding-darwin-x64":"0.4.5","@andreiltd/componentize-qjs-binding-darwin-arm64":"0.4.5","@andreiltd/componentize-qjs-binding-linux-x64-gnu":"0.4.5","@andreiltd/componentize-qjs-binding-linux-x64-musl":"0.4.5","@andreiltd/componentize-qjs-binding-win32-x64-msvc":"0.4.5","@andreiltd/componentize-qjs-binding-linux-arm64-gnu":"0.4.5","@andreiltd/componentize-qjs-binding-linux-arm64-musl":"0.4.5","@andreiltd/componentize-qjs-binding-win32-arm64-msvc":"0.4.5"},"_npmOperationalInternal":{"tmp":"tmp/componentize-qjs_0.4.5_1789557011802_0.6916557008029964","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"_id":"componentize-qjs@0.5.0","bin":{"componentize-qjs":"bin/componentize-qjs"},"bugs":{"url":"https://github.com/andreiltd/componentize-qjs/issues"},"dist":{"shasum":"b7904f51ff59f4053a8da3b818757255e87ad501","tarball":"https://registry.npmjs.org/componentize-qjs/-/componentize-qjs-0.5.0.tgz","fileCount":7,"integrity":"sha512-vsuvlO1XZ+BwpaBXmwBBkrqY3eCXONG57cMn8EVJJ3o5R8yjnfMfbgtEMq8RaA4EO0BHVVXtb3ts+1UYaI/qdw==","signatures":[{"sig":"MEQCIEXdGBlMo6lBIWrtx+45ZSvlahY6/zafMMenPhM0k8UeAiB3/oWkUMfGcFGXugJnHlFqGAfmnZMo3F/YoSmPj0KWFA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIENbfC9JEyuynXaDoSgY77HDUgl0nT7HRCTruVJ0tu6RAiAWGLvj/AGLxiU7lQnVDSKIBrAL1Plrr7JdUipJSTH1bA=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/componentize-qjs@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":70818},"main":"index.js","name":"componentize-qjs","napi":{"targets":["x86_64-apple-darwin","aarch64-apple-darwin","x86_64-unknown-linux-gnu","aarch64-unknown-linux-gnu","x86_64-unknown-linux-musl","aarch64-unknown-linux-musl","x86_64-pc-windows-msvc","aarch64-pc-windows-msvc"],"binaryName":"componentize-qjs","packageName":"@andreiltd/componentize-qjs-binding"},"types":"index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"66b3fafcfd7588e155edc0bec4839e5de7298072","license":"Apache-2.0","scripts":{"test":"vitest run --dir ./test","build":"npm run build:release","build:debug":"napi build --manifest-path ../napi/Cargo.toml --platform --js index.js --dts index.d.ts -o .","build:release":"napi build --manifest-path ../napi/Cargo.toml --platform --js index.js --dts index.d.ts -o . --release"},"version":"0.5.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"2bd5abab-9883-4085-b6bb-e19658ed71e0"}},"homepage":"https://github.com/andreiltd/componentize-qjs","repository":{"url":"git+https://github.com/andreiltd/componentize-qjs.git","type":"git","directory":"npm"},"_npmVersion":"11.21.1","description":"Convert JavaScript to WebAssembly components using QuickJS","directories":{},"maintainers":[{"name":"andreiltd","email":"andreiltd@gmail.com"}],"_nodeVersion":"24.21.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^5.0.0","@napi-rs/cli":"^3"},"optionalDependencies":{"@andreiltd/componentize-qjs-binding-darwin-x64":"0.5.0","@andreiltd/componentize-qjs-binding-darwin-arm64":"0.5.0","@andreiltd/componentize-qjs-binding-linux-x64-gnu":"0.5.0","@andreiltd/componentize-qjs-binding-linux-x64-musl":"0.5.0","@andreiltd/componentize-qjs-binding-win32-x64-msvc":"0.5.0","@andreiltd/componentize-qjs-binding-linux-arm64-gnu":"0.5.0","@andreiltd/componentize-qjs-binding-linux-arm64-musl":"0.5.0","@andreiltd/componentize-qjs-binding-win32-arm64-msvc":"0.5.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/componentize-qjs_0.5.0_1792684933978_0.8192800088354633"}}},"time":{"created":"2026-05-05T21:03:32.906Z","modified":"2026-10-22T16:02:14.506Z","0.2.0":"2026-05-05T21:03:33.126Z","0.2.1":"2026-05-13T09:11:43.940Z","0.2.2":"2026-05-27T12:19:19.436Z","0.3.0":"2026-06-10T09:54:20.687Z","0.4.0":"2026-06-16T15:26:59.975Z","0.4.1":"2026-06-18T15:08:35.673Z","0.4.2":"2026-07-10T15:27:49.144Z","0.4.3":"2026-07-25T16:37:51.064Z","0.4.4":"2026-09-02T15:29:00.021Z","0.4.5":"2026-09-16T11:10:11.962Z","0.5.0":"2026-10-22T16:02:14.069Z"},"bugs":{"url":"https://github.com/andreiltd/componentize-qjs/issues"},"license":"Apache-2.0","homepage":"https://github.com/andreiltd/componentize-qjs","repository":{"url":"git+https://github.com/andreiltd/componentize-qjs.git","type":"git","directory":"npm"},"description":"Convert JavaScript to WebAssembly components using QuickJS","maintainers":[{"name":"andreiltd","email":"andreiltd@gmail.com"}],"readme":"# componentize-qjs\n\n[![CI](https://github.com/andreiltd/componentize-qjs/actions/workflows/ci.yml/badge.svg)](https://github.com/andreiltd/componentize-qjs/actions/workflows/ci.yml)\n[![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nConvert JavaScript source code into\n[WebAssembly components](https://component-model.bytecodealliance.org/) using\n[QuickJS](https://github.com/quickjs-ng/quickjs).\n\n## Overview\n\n`componentize-qjs` takes a JavaScript source file and a\n[WIT](https://component-model.bytecodealliance.org/design/wit.html) definition,\nand produces a standalone WebAssembly component that can run on any\ncomponent-model runtime (e.g. [Wasmtime](https://wasmtime.dev/)).\n\nUnder the hood it:\n\n1. Embeds the [QuickJS](https://github.com/quickjs-ng/quickjs) engine (via\n   [rquickjs](https://github.com/DelSkayn/rquickjs)) as the JavaScript\n   runtime.\n2. Uses [wit-dylib](https://crates.io/crates/wit-dylib) to generate WIT\n   bindings that bridge the component model and the JS engine.\n3. Snapshots the initialized JS state with\n   [Wizer](https://github.com/bytecodealliance/wizer) so startup cost is paid at\n   build time, not at runtime.\n4. Prunes explicitly marked one-time setup code with Walrus and strips\n   debug/build metadata from the snapshotted component.\n\n## Prerequisites\n\nRust **1.97** or later is required by Wasmtime (the `wasm32-wasip2` target also\nneeds a recent toolchain for PIC support in wasi-libc).\n\n## Installation\n\n### Rust CLI (crates.io)\n\n```bash\ncargo install componentize-qjs-cli --locked\n```\n\nThis installs the `componentize-qjs` command.\n\n### Rust CLI (from source)\n\n```bash\ncargo install --path . --locked\n```\n\n### Prebuilt CLI binaries\n\nPrebuilt CLI archives are attached to each\n[GitHub release](https://github.com/andreiltd/componentize-qjs/releases) for\nLinux, macOS, and Windows.\n\n### npm package\n\n```bash\nnpm install componentize-qjs\n```\n\nThis pulls in the right prebuilt native binding for your platform via the\n`@andreiltd/componentize-qjs-binding-*` optional dependencies.\n\nIf you want to build from source run:\n\n```bash\ncd npm && npm install && npm run build\n```\n\n## Quick Start\n\n**1. Define a WIT interface** (`hello.wit`):\n\n```wit\npackage test:hello;\n\nworld hello {\n    export greet: func(name: string) -> string;\n}\n```\n\n**2. Implement it in JavaScript** (`hello.js`):\n\nJavaScript sources are ES modules. Export WIT functions and interfaces directly\nfrom the module.\n\n```js\nexport function greet(name) {\n    return `Hello, ${name}!`;\n}\n```\n\n**3. Build the component:**\n\n```bash\ncomponentize-qjs --wit hello.wit --js hello.js -o hello.wasm\n```\n\n**4. Run it:**\n\n```bash\nwasmtime run --wasm component-model-async=y --invoke 'greet(\"World\")' hello.wasm\n# \"Hello, World!\"\n```\n\nThe built-in runtime published with componentize-qjs includes component-model\nasync support. Pass `--sync` to embed the built-in non-async runtime instead,\nproducing components that run on hosts without component-model async support. A\ncustom runtime can also be supplied with `--runtime`.\n\n## CLI Reference\n\n```\ncomponentize-qjs [OPTIONS] --wit <WIT> --js <JS>\n```\n\n| Flag | Short | Description |\n|---|---|---|\n| `--wit <PATH>` | `-w` | Path to the WIT file or directory |\n| `--js <PATH>` | `-j` | Path to the JavaScript source file |\n| `--output <PATH>` | `-o` | Output path (default: `output.wasm`) |\n| `--module-root <PATH>` | | Root directory exposed read-only during Wizer for resolving JavaScript imports |\n| `--world <NAME>` | `-n` | World name when the WIT defines multiple worlds |\n| `--stub-wasi` | | Replace all WASI imports with trap stubs |\n| `--minify` | `-m` | Minify JS source before embedding |\n| `--opt-size` | | Use the built-in QuickJS runtime optimized for size |\n| `--sync` | | Use the built-in non-async runtime (combine with `--opt-size` for the non-async opt-size runtime) |\n| `--runtime <PATH>` | | Custom QuickJS runtime Wasm module to embed |\n\n### Cargo features\n\n| Feature | Effect |\n|---|---|\n| `component-model-async` | (default) Embed the component-model async runtime as the default built-in. The non-async runtime is always embedded and selectable via `--sync`. Disable to build a smaller binary with only the non-async runtime |\n| `opt-size` | Selects the bundled opt-size runtime when no runtime option is provided by the CLI or npm API |\n\nBuild with features:\n\n```bash\ncargo build --release --features opt-size\n```\n\n## Using Imports\n\nWIT imports are available as ES module imports using their fully-qualified WIT\ninterface name:\n\n```wit\n// imports.wit\npackage local:test;\n\ninterface math {\n    add: func(a: s32, b: s32) -> s32;\n    multiply: func(a: s32, b: s32) -> s32;\n}\n\nworld imports {\n    import math;\n    export double-add: func(a: s32, b: s32) -> s32;\n}\n```\n\n```js\n// imports.js\nimport math from \"local:test/math\";\n\nexport function doubleAdd(a, b) {\n    const sum = math.add(a, b);\n    return math.multiply(sum, 2);\n}\n```\n\nJavaScript modules imported by the entry file are resolved during Wizer\ninitialization. Relative imports are resolved from the entry file path passed to\n`--js`; bare package imports are resolved under the read-only module root. By\ndefault the CLI uses the current directory when the entry file is under it, or\nthe entry file's parent directory otherwise. Use `--module-root <PATH>` to expose\na project root that contains shared files or `node_modules`.\n\n## WIT Type Mappings\n\n### Primitive Types\n\n| WIT Type | JS Type | Notes |\n|----------|---------|-------|\n| `bool` | `boolean` | |\n| `u8`, `u16`, `u32` | `number` | |\n| `s8`, `s16`, `s32` | `number` | |\n| `u64`, `s64` | `BigInt` | |\n| `f32`, `f64` | `number` | |\n| `char` | `string` | Must be exactly one Unicode scalar value |\n| `string` | `string` | |\n\n### Compound Types\n\n| WIT Type | JS Type | Example |\n|----------|---------|---------|\n| `list<T>` | `Array` | `[1, 2, 3]` |\n| `list<u8>` | `Uint8Array` or `Array` | `new Uint8Array([1, 2, 3])` |\n| `map<K, V>` | `Map` | `new Map([[\"key\", value]])` |\n| `tuple<T, U, ...>` | `Array` | `[42, \"hello\"]` |\n| `option<T>` | `T \\| null` (nested: `{ tag: \"some\"\\|\"none\", val }`) | `null` for none; `option<option<T>>` is wrapped |\n| `result<T, E>` | top-level function result: return `T` or throw `E`; nested result: `{ tag: \"ok\"\\|\"err\", val?: T\\|E }` | `return 42` / `throw \"error\"` |\n| `record { ... }` | `object` (camelCase keys) | `{ myField: 1 }` |\n| `variant` | `{ tag: string, val?: T }` | `{ tag: \"circle\", val: 2.5 }` |\n| `enum` | `string` (case name) | `\"red\"` |\n| `flags` | `object` (camelCase booleans) | `{ read: true, write: false }` |\n| `own<R>`, `borrow<R>` | resource object (methods on its prototype) | `input.blockingRead(n)` |\n\n### Imported Resources\n\nImported resources are exposed as JavaScript classes. Resource methods are\ncalled on the handle:\n\n```js\nimport stdin from \"wasi:cli/stdin@0.2.12\";\nimport stdout from \"wasi:cli/stdout@0.2.12\";\n\nconst input = stdin.getStdin();     // an InputStream\nconst output = stdout.getStdout();  // an OutputStream\n\n// Methods whose WIT return type is result<...> return the ok payload or throw.\nconst chunk = input.blockingRead(4096);   // method on the resource (len is a number)\noutput.blockingWriteAndFlush(chunk);\n```\n\n`[static]` methods are exposed on the resource class and `[constructor]` makes\nthe class callable with `new`.\n\nOwned imported resources support `[Symbol.dispose]()` for deterministic\ncleanup. Passing one to a WIT `own<T>` parameter transfers ownership and\ninvalidates the original wrapper. Borrowed wrappers expire when their component\ncall completes and cannot be transferred or disposed as owners. Resources lent\nto an in-flight import remain alive and cannot be disposed or transferred until\nthat import completes. Ownership is restored for unconsumed stream/future writes\nand for imported calls cancelled before they start. Await imports using an\nincoming borrowed resource before returning from its export.\n\n### Cancelling Async Imports\n\nA pending async import exposes a `cancel()` method on its Promise. Calling it\nrequests cancellation of that import. If cancellation succeeds, the original\nPromise rejects with `async import cancelled`; a call that finishes first may\nstill resolve normally. The enclosing export remains active, so its catch/finally\nblocks can await further host operations.\nAwait the original Promise before releasing resources it borrowed.\nCall `cancel()` from the same async export invocation that started the import;\nit has no effect from another export invocation.\n\nCalls that complete immediately may have no `cancel` method; use optional\nchaining when completion timing is unknown. Repeated cancellation is harmless,\nand a saved cancellation function cannot affect a later call that reuses the\nsame runtime handle.\n\n```js\nconst pending = service.compute(input);\nconst abort = () => pending.cancel?.();\nsignal.addEventListener(\"abort\", abort);\ntry {\n    return await pending;\n} finally {\n    signal.removeEventListener(\"abort\", abort);\n    await service.release();\n}\n```\n\n### Async Exports\n\nAsync exports are declared with the `async` keyword in WIT and implemented\nas JavaScript `async` functions:\n\n```wit\npackage example:greeting;\n\nworld greeter {\n    export greet: async func(name: string) -> string;\n}\n```\n\n```js\nexport async function greet(name) {\n    // You can use await here\n    await Promise.resolve();\n    return `Hello, ${name}!`;\n}\n```\n\nExported resource methods and static methods may also be async. Implement them\nas `async` members on the exported JavaScript class; resource constructors\nremain synchronous:\n\n```wit\npackage example:counter;\n\ninterface counter-api {\n    resource counter {\n        constructor(initial: u32);\n        add: async func(value: u32) -> u32;\n        create: static async func(initial: u32) -> counter;\n    }\n}\n\nworld counter {\n    export counter-api;\n}\n```\n\n```js\nclass Counter {\n    constructor(initial) { this.value = initial; }\n    async add(value) { this.value += value; return this.value; }\n    static async create(initial) { return new this(initial); }\n}\n\nexport const counterApi = { Counter };\n```\n\n### Streams\n\nStreams transfer a sequence of values between components. Lifted WIT streams\nimplement the JavaScript async-iterable protocol, and async or synchronous\niterables are lowered to WIT streams automatically. The stream type is inferred\nfrom the function parameter or result:\n\n```wit\npackage example:streaming;\n\nworld streaming {\n    export uppercase: async func(input: stream<string>) -> stream<string>;\n}\n```\n\n```js\nexport async function uppercase(input) {\n    return (async function* () {\n        for await (const value of input) {\n            yield value.toUpperCase();\n        }\n    })();\n}\n```\n\nAsync iteration yields one element at a time, except for `stream<u8>`, which\nyields bounded `Uint8Array` chunks to avoid one promise per byte.\n\nUse the `wit.Stream` factory when direct access to both endpoints is needed. If\nonly one stream type exists in the WIT world, the type may be omitted:\n\n```js\nconst { readable, writable } = wit.Stream(wit.Stream.U8);\nawait writable.writeAll(new Uint8Array([1, 2, 3]));\nwritable.drop();\n```\n\n`wit.Stream.from` adapts an iterable explicitly and exposes a completion\npromise:\n\n```js\nconst source = (async function* () {\n    yield \"one\";\n    yield \"two\";\n})();\nconst { readable, completion } = wit.Stream.from(source, wit.Stream.STRING);\n```\n\nAvailable type constants (populated from WIT metadata):\n\n| WIT type | Constant |\n|----------|----------|\n| `stream<u8>` / `future<u8>` | `wit.Stream.U8` / `wit.Future.U8` |\n| `stream<u32>` / `future<u32>` | `wit.Stream.U32` / `wit.Future.U32` |\n| `stream<string>` / `future<string>` | `wit.Stream.STRING` / `wit.Future.STRING` |\n| `stream<f64>` / `future<f64>` | `wit.Stream.F64` / `wit.Future.F64` |\n\nAll constructors return `{ readable, writable }`.\n\n**Complex element types** are also supported. The type constant is generated\nrecursively from the WIT type structure:\n\n```js\n// stream<result<string, u32>>\nwit.Stream(wit.Stream.RESULT_STRING_U32);\n\n// stream<option<u32>>\nwit.Stream(wit.Stream.OPTION_U32);\n\n// stream<tuple<u32, string>>\nwit.Stream(wit.Stream.TUPLE_U32_STRING);\n\n// Named record types use their WIT name:\n// record point { x: f64, y: f64 }\n// stream<point>\nwit.Stream(wit.Stream.POINT);\n```\n\nExplicit WIT stream aliases are also exposed as constants:\n\n```wit\ntype prompt-stream = stream<message-chunk>;\n```\n\n```js\nwit.Stream(wit.Stream.PROMPT_STREAM);\n```\n\nUse `wit.Stream.types` or `wit.Future.types` to discover all available type\nconstants at runtime.\n\n**StreamReadable methods:**\n\n| Method | Returns | Description |\n|--------|---------|-------------|\n| `read(count?)` | `Promise<T[]>` (or `Uint8Array` for `u8`) | Read up to `count` values |\n| `next()` | `Promise<IteratorResult<T>>` | Read the next value (`Uint8Array` chunk for `u8`) |\n| `return()` | `Promise<IteratorResult<T>>` | End iteration and release the readable handle |\n| `cancelRead()` | result or `undefined` | Cancel an in-progress read |\n| `drop()` | `void` | Release the stream handle |\n| `[Symbol.asyncIterator]()` | `StreamReadable` | Consume the stream with `for await...of` |\n\n**StreamWritable methods:**\n\n| Method | Returns | Description |\n|--------|---------|-------------|\n| `write(data)` | `Promise<number>` | Write values, returns count written |\n| `writeOne(value)` | `Promise<number>` | Write exactly one value, including array-shaped WIT values |\n| `writeAll(data)` | `Promise<number>` | Write all values, retrying as needed |\n| `writeIterableItem(value)` | `Promise<boolean>` | Write one iterable yield, batching matching numeric typed arrays |\n| `cancelWrite()` | result or `undefined` | Cancel an in-progress write |\n| `drop()` | `void` | Release the stream handle |\n\n### Futures\n\nFutures transfer a single value. They work like streams but carry exactly one\nvalue:\n\n```wit\npackage example:async-value;\n\nworld async-value {\n    export compute: async func() -> future<string>;\n}\n```\n\n```js\nexport async function compute() {\n    const { readable, writable } = wit.Future();\n\n    // Write the value (fire-and-forget; completes when reader reads)\n    writable.write(\"computed result\");\n\n    return readable;\n}\n```\n\n**Future type constants** follow the same pattern: `wit.Future.U32`,\n`wit.Future.STRING`, etc.\n\nFuture handles are deliberately not thenable: use `await readable.read()` to\nobtain the payload. This keeps `return readable` in an async export from\nimplicitly consuming the future, and preserves nested future handles.\nRepeated `read()` calls share the same Promise; a cancelled read rejects that\nPromise and allows a subsequent read to retry.\n\n`wit.Future.from(value, type)` adapts a value or Promise and returns\n`{ readable, completion }`. Return its `readable` from an async export rather\nthan returning the payload Promise directly, which JavaScript would await.\n\n**FutureReadable methods:**\n\n| Method | Returns | Description |\n|--------|---------|-------------|\n| `read()` | `Promise<T>` | Read the single value |\n| `cancelRead()` | result or `undefined` | Cancel an in-progress read |\n| `drop()` | `void` | Release the future handle |\n\n**FutureWritable methods:**\n\n| Method | Returns | Description |\n|--------|---------|-------------|\n| `write(value)` | `Promise<boolean>` | Write the value, returns success |\n| `cancelWrite()` | result or `undefined` | Cancel an in-progress write |\n| `drop()` | `void` | Release the future handle |\n\n### Resource Cleanup\n\nOwned imported resources, stream endpoints, and future endpoints support\n[Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management)\nvia `Symbol.dispose`. In environments that support `using`:\n\n```js\n{\n    const stream = wit.Stream();\n    using writable = stream.writable;\n    using readable = stream.readable;\n    // Each endpoint is disposed when leaving scope.\n}\n```\n\nThe factory's `{ readable, writable }` pair is not itself disposable.\nComplete an endpoint's pending operation (or cancel it and await its\nsettlement) before leaving its `using` scope or calling `.drop()`.\nHost-requested task cancellation retains pending ABI buffers until the host\nacknowledges each operation's completion or cancellation.\n\nOtherwise, call `.drop()` explicitly to release handles.\n\n## Snapshot Initialization\n\nSnapshot creation uses a 1 GiB host-call copy budget to accommodate large module\ngraphs. This allowance belongs to the build-time initializer; execution hosts\ncontinue to choose their own budgets for instantiated components.\n\n## Node.js API\n\nThe npm package exposes both a CLI and a programmatic API.\n\n### CLI\n\n```bash\nnpx componentize-qjs --wit hello.wit --js hello.js -o hello.wasm\n```\n\n(Or, if you installed the package globally, just `componentize-qjs ...`.)\n\n### Usage\n\n```js\nimport { componentize } from \"componentize-qjs\";\n\nconst { component } = await componentize({\n    witPath: \"hello.wit\",\n    jsSource: \"export function greet(name) { return `Hello, ${name}!`; }\",\n    optSize: true,\n});\n// component is a Buffer containing the WebAssembly component bytes\n```\n\nRuntime selection is available through `optSize`, `sync`, `runtime`, or\n`runtimeBytes`. `optSize` and `sync` may be combined to select the non-async\nopt-size runtime, but neither can be combined with a custom `runtime`/`runtimeBytes`.\nThe `runtime` option is a path to a custom QuickJS runtime Wasm module.\n\n## Acknowledgments\n\nThis project builds on ideas and code from:\n\n- [ComponentizeJS](https://github.com/dicej/componentize-js) by Joel Dice\n- [lua-component-demo](https://github.com/alexcrichton/lua-component-demo) by Alex Crichton\n\n## License\n\nLicensed under [Apache-2.0](LICENSE).\n","readmeFilename":"README.md"}