singularity-forge/packages/native/package.json
TÂCHES b730ed87d0 feat: native Rust xxHash32 for hashline (#272)
* feat: replace pure-JS xxHash32 with native Rust implementation via napi

The hashline edit tool calls xxHash32 on every line of every file read/edit.
Moving this to a native Rust implementation (xxhash-rust crate) eliminates
JS overhead for this hot path. Hash output is identical -- verified by tests
comparing native vs JS reference across 11 input vectors including empty
strings, short/long inputs, unicode, and seeded variants.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: use typed native interface and remove version-drag comment in xxhash wrapper

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 16:46:08 -06:00

64 lines
1.8 KiB
JSON

{
"name": "@gsd/native",
"version": "0.1.0",
"description": "Native Rust bindings for GSD \u2014 high-performance native modules via N-API",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsc -p tsconfig.json",
"build:native": "node ../../native/scripts/build.js",
"build:native:dev": "node ../../native/scripts/build.js --dev",
"test": "node --test src/__tests__/grep.test.mjs src/__tests__/ps.test.mjs src/__tests__/glob.test.mjs src/__tests__/clipboard.test.mjs src/__tests__/highlight.test.mjs src/__tests__/html.test.mjs src/__tests__/text.test.mjs src/__tests__/fd.test.mjs src/__tests__/image.test.mjs"
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
},
"./grep": {
"types": "./dist/grep/index.d.ts",
"import": "./dist/grep/index.js"
},
"./ps": {
"types": "./dist/ps/index.d.ts",
"import": "./dist/ps/index.js"
},
"./glob": {
"types": "./dist/glob/index.d.ts",
"import": "./dist/glob/index.js"
},
"./clipboard": {
"types": "./dist/clipboard/index.d.ts",
"import": "./dist/clipboard/index.js"
},
"./ast": {
"types": "./dist/ast/index.d.ts",
"import": "./dist/ast/index.js"
},
"./html": {
"types": "./dist/html/index.d.ts",
"import": "./dist/html/index.js"
},
"./text": {
"types": "./dist/text/index.d.ts",
"import": "./dist/text/index.js"
},
"./fd": {
"types": "./dist/fd/index.d.ts",
"import": "./dist/fd/index.js"
},
"./image": {
"types": "./dist/image/index.d.ts",
"import": "./dist/image/index.js"
},
"./xxhash": {
"types": "./dist/xxhash/index.d.ts",
"import": "./dist/xxhash/index.js"
}
},
"files": [
"dist"
],
"license": "MIT"
}