{"_id":"@create-font/fea-rs-wasm","_rev":"3-5936b16623c8883049375b16d4fb5bbe","name":"@create-font/fea-rs-wasm","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@create-font/fea-rs-wasm","version":"0.1.0","_id":"@create-font/fea-rs-wasm@0.1.0","maintainers":[{"name":"jeremybanka","email":"hello@jeremybanka.com"}],"homepage":"https://github.com/jeremybanka/create-font#readme","bugs":{"url":"https://github.com/jeremybanka/create-font/issues"},"dist":{"shasum":"b8d7b65089829e644406ace00fac7c3747a5874d","tarball":"https://registry.npmjs.org/@create-font/fea-rs-wasm/-/fea-rs-wasm-0.1.0.tgz","fileCount":12,"integrity":"sha512-vsvHSVRkoJxfgarfqz/yJ2krR+5TCOlJbsQGE7VhiC3GbxBJlbrxu+cchg+kgHiUY1LJ3gaGa41wQCYKZFscBQ==","signatures":[{"sig":"MEUCIHMUsaD5BeLh/8iM8zWbU32fuPHc9wFHgUaY/dlzV3LXAiEA9/JtnaVdEEuXTAcU8tTA/XL3lh2iwxyJxiBfPKh15lg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":582209},"type":"module","engines":{"node":">=22.0.0"},"exports":{".":{"node":"./dist/node/create_font_fea_rs_wasm.js","types":"./dist/web/create_font_fea_rs_wasm.d.ts","browser":"./dist/web/create_font_fea_rs_wasm.js","default":"./dist/web/create_font_fea_rs_wasm.js"},"./web":{"types":"./dist/web/create_font_fea_rs_wasm.d.ts","default":"./dist/web/create_font_fea_rs_wasm.js"},"./node":{"types":"./dist/node/create_font_fea_rs_wasm.d.ts","default":"./dist/node/create_font_fea_rs_wasm.js"},"./package.json":"./package.json","./manifest.json":"./dist/create-font-fea-rs-wasm.json"},"gitHead":"007579144a71726abc75f71477b7b2bc785b7a0f","scripts":{"test":"vp test","build":"node ../../scripts/build-fea-rs-wasm.ts","benchmark":"node ../../scripts/benchmark-fea-rs-wasm.ts"},"_npmUser":{"name":"jeremybanka","email":"hello@jeremybanka.com"},"repository":{"url":"git+https://github.com/jeremybanka/create-font.git","type":"git","directory":"packages/fea-rs-wasm"},"_npmVersion":"11.17.0","description":"WebAssembly bindings for fea-rs and the create-font Adobe Feature File formatter","directories":{},"sideEffects":false,"_nodeVersion":"26.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"4.1.10"},"_npmOperationalInternal":{"tmp":"tmp/fea-rs-wasm_0.1.0_1784881755895_0.5889208874876104","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@create-font/fea-rs-wasm","version":"0.1.1","_id":"@create-font/fea-rs-wasm@0.1.1","maintainers":[{"name":"jeremybanka","email":"hello@jeremybanka.com"}],"dist":{"shasum":"c9331911440855f673d4a1c0af49fc4f35a808e0","tarball":"https://registry.npmjs.org/@create-font/fea-rs-wasm/-/fea-rs-wasm-0.1.1.tgz","fileCount":12,"integrity":"sha512-pJbxZnD0HVrx9DNqodRVa/a6bVHh67pp/OFN5DVLkz9+L4dyGmDn004BDb1+HfvQ3kK3+YF4gw0rBBn32bqNKw==","signatures":[{"sig":"MEYCIQCfb9bSm22ZDGwHI2j6Mn/QYlh00s/fVArLrnPQz8TLmAIhAOpZRtwgK3K1OufOGf0gPB4MBzEhRSYa9Ux7sl1mBovG","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@create-font%2ffea-rs-wasm@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":580887},"type":"module","engines":{"node":">=22.0.0"},"exports":{".":{"node":"./dist/node/create_font_fea_rs_wasm.js","types":"./dist/web/create_font_fea_rs_wasm.d.ts","browser":"./dist/web/create_font_fea_rs_wasm.js","default":"./dist/web/create_font_fea_rs_wasm.js"},"./web":{"types":"./dist/web/create_font_fea_rs_wasm.d.ts","default":"./dist/web/create_font_fea_rs_wasm.js"},"./node":{"types":"./dist/node/create_font_fea_rs_wasm.d.ts","default":"./dist/node/create_font_fea_rs_wasm.js"},"./package.json":"./package.json","./manifest.json":"./dist/create-font-fea-rs-wasm.json"},"scripts":{"test":"vp test","build":"node ../../scripts/build-fea-rs-wasm.ts","benchmark":"node ../../scripts/benchmark-fea-rs-wasm.ts"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3f4db171-04c3-4f45-ab7f-1402e657f7df"}},"repository":{"url":"https://github.com/jeremybanka/create-font","type":"git","directory":"packages/fea-rs-wasm"},"description":"WebAssembly bindings for fea-rs and the create-font Adobe Feature File formatter","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"4.1.10"},"_npmOperationalInternal":{"tmp":"tmp/fea-rs-wasm_0.1.1_1785001481248_0.8766618152314185","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@create-font/fea-rs-wasm","version":"0.1.2","description":"WebAssembly bindings for fea-rs and the create-font Adobe Feature File formatter","license":"MPL-2.0","repository":{"type":"git","url":"https://github.com/jeremybanka/create-font","directory":"packages/create-font/fea-rs-wasm"},"publishConfig":{"access":"public"},"type":"module","sideEffects":false,"exports":{".":{"browser":"./dist/web/create_font_fea_rs_wasm.js","node":"./dist/node/create_font_fea_rs_wasm.js","types":"./dist/web/create_font_fea_rs_wasm.d.ts","default":"./dist/web/create_font_fea_rs_wasm.js"},"./web":{"types":"./dist/web/create_font_fea_rs_wasm.d.ts","default":"./dist/web/create_font_fea_rs_wasm.js"},"./node":{"types":"./dist/node/create_font_fea_rs_wasm.d.ts","default":"./dist/node/create_font_fea_rs_wasm.js"},"./manifest.json":"./dist/create-font-fea-rs-wasm.json","./package.json":"./package.json"},"devDependencies":{"vitest":"4.1.10"},"engines":{"node":">=22.0.0"},"scripts":{"build":"node ../../../scripts/build-fea-rs-wasm.ts","benchmark":"node ../../../scripts/benchmark-fea-rs-wasm.ts","test":"vp test"},"_nodeVersion":"26.0.0","_id":"@create-font/fea-rs-wasm@0.1.2","dist":{"integrity":"sha512-vNR2Li8kga3kCVlJomJcggwzGI1WG2Gaf14Ba8wW9uaIYZBOuZhRZbQ7nqH49/ct+tcznkxiQM9tXhGN1RPVCA==","shasum":"1cf064b760b91d579653b95a6ece2307a7ddb091","tarball":"https://registry.npmjs.org/@create-font/fea-rs-wasm/-/fea-rs-wasm-0.1.2.tgz","fileCount":13,"unpackedSize":596577,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@create-font%2ffea-rs-wasm@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAqCLoEHT8C5scwAufs4aK6+rkJL4Slpm9XE71KPrNi3AiEAmW3W7/r6QL9j0OR4NEAak9NmN5oCMFerW8h9II5B7mo="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3f4db171-04c3-4f45-ab7f-1402e657f7df"}},"directories":{},"maintainers":[{"name":"jeremybanka","email":"hello@jeremybanka.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/fea-rs-wasm_0.1.2_1785742022168_0.8756707788095079"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-24T08:29:15.790Z","modified":"2026-08-03T07:27:02.731Z","0.1.0":"2026-07-24T08:29:16.130Z","0.1.1":"2026-07-25T17:44:41.419Z","0.1.2":"2026-08-03T07:27:02.338Z"},"repository":{"type":"git","url":"https://github.com/jeremybanka/create-font","directory":"packages/create-font/fea-rs-wasm"},"description":"WebAssembly bindings for fea-rs and the create-font Adobe Feature File formatter","maintainers":[{"name":"jeremybanka","email":"hello@jeremybanka.com"}],"readme":"# `@create-font/fea-rs-wasm`\n\nWebAssembly bindings for\n[`fea-rs`](https://github.com/googlefonts/fontc/tree/main/fea-rs) and the\ncreate-font Adobe Feature File (`.fea`) formatter, packaged for Node and\nbrowsers.\n\n`fea-rs` owns the Adobe feature grammar, parser, error recovery, and lossless\nconcrete syntax tree. This package does not implement a separate parser or AST.\nIt provides:\n\n- a versioned JSON projection of the `fea-rs` concrete syntax tree and\n  diagnostics;\n- generated WebAssembly entry points for browsers and Node;\n- the create-font deterministic, idempotent formatter.\n\n## JavaScript API\n\nUse the browser entry point and initialize it before calling the synchronous\nexports:\n\n```ts\nimport init, { formatFea, parseFea } from \"@create-font/fea-rs-wasm/web\"\n\nawait init()\nconst syntax = JSON.parse(parseFea(\"feature liga { sub f i by f_i; } liga;\"))\nconst formatted = formatFea(\n\t\"feature liga{sub f i by f_i;}liga;\",\n\tJSON.stringify({ lineWidth: 100 }),\n)\n```\n\nThe Node entry point initializes itself:\n\n```ts\nimport { formatFea, parseFea } from \"@create-font/fea-rs-wasm/node\"\n```\n\n`parseFea` invokes `fea-rs` and returns JSON with `abiVersion`, `sourceLen`, a\nrecursive `root`, and recoverable `diagnostics`. Every node and token has a\nhalf-open UTF-8 byte range. Tokens include their exact source text, including\nwhitespace and comments, so concatenating the token text reconstructs the input\nbyte for byte.\n\nABI version `1` uses owned JavaScript strings on both sides of each call. The\nmodule owns its linear memory, and the Rust API keeps no document handles,\ncached trees, or source text after a call returns. A breaking JSON shape,\ndiagnostic code, or ownership change requires an ABI version bump.\n\nIncludes are intentionally not loaded by the binding boundary. An\n`include(path.fea)` statement remains in the concrete syntax tree; the host owns\nfilesystem or network resolution.\n\n`formatFea` accepts JSON with these properties:\n\n- `lineWidth` (default `80`);\n- `indentWidth` (default `2`);\n- `useTabs` (default `false`);\n- `newLineKind`: `\"auto\"`, `\"lineFeed\"`, or `\"carriageReturnLineFeed\"`.\n\nFormatting is fail-closed. If parsing reports an error, no rewritten text is\nreturned.\n\n## Syntax coverage and deviations\n\nParsing is provided by `fea-rs` 0.22 and follows its Adobe Feature File grammar,\nincluding GSUB and GPOS rules, named lookups, glyph classes, value records,\nfeature variations, and the supported Adobe table blocks. The repository\nfixture exercises languagesystems, classes, includes, lookup blocks,\nsubstitution, contextual rules, positioning, value records, and GDEF.\n\nThis binding intentionally exposes syntax parsing only. Project-aware include\nloading, glyph inventory checks, lookup validation, and create-font semantic\nlowering belong to the host analysis layer. Diagnostic codes and byte ranges\nare normalized at the binding boundary; explanatory text and syntax-kind names\nfollow the pinned `fea-rs` release.\n\n## Rebuilding\n\nInstall the versions pinned by the repository and build:\n\n```sh\nmise install\npnpm --filter @create-font/fea-rs-wasm build\n```\n\nThe build uses mise-managed Cargo, Rust, the `wasm32-unknown-unknown` target,\nand `wasm-bindgen-cli`. Generated bindings and Wasm stay under the ignored\n`dist/` directory and are included only in the published package.\n\nRun the package checks with:\n\n```sh\npnpm --filter @create-font/fea-rs-wasm build\npnpm --filter @create-font/fea-rs-wasm test\npnpm --filter @create-font/fea-rs-wasm pack --dry-run\n```\n\n`dist/create-font-fea-rs-wasm.json` records the ABI version, byte size, and\nSHA-256 of both runtime artifacts.\n\n## Reference size and performance\n\nA release runtime built with Rust 1.97.1 is approximately 278 kB. Regenerate\nperformance measurements after a build with:\n\n```sh\npnpm --filter @create-font/fea-rs-wasm benchmark\n```\n","readmeFilename":"","license":"MPL-2.0"}