* feat: scaffold Rust native engine with grep module (napi-rs)
Adds a Rust N-API addon architecture inspired by Oh My Pi's pi-natives.
The grep module wraps ripgrep's core crates (grep-regex, grep-searcher,
grep-matcher) and exposes `search()` and `grep()` to Node.js via napi-rs.
Includes:
- Cargo workspace at native/ with engine (cdylib) and grep (lib) crates
- Build script (native/scripts/build.js) producing platform-tagged .node files
- TypeScript wrapper package (@gsd/native) with types and loader
- 6 Rust unit tests + 9 Node.js integration tests (all passing)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: audit fixes for rust native engine PR
- Fix repository URL to gsd-build/gsd-2
- Remove dead add_custom_ignore_filename("") call
- Unify error model: search() now returns Result<> (throws) matching grep()
- Remove error field from NapiSearchResult and SearchResult types
- Use t.after() in integration tests for reliable temp dir cleanup
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
27 lines
662 B
JSON
27 lines
662 B
JSON
{
|
|
"name": "@gsd/native",
|
|
"version": "0.1.0",
|
|
"description": "Native Rust bindings for GSD — high-performance grep via N-API",
|
|
"type": "module",
|
|
"main": "./src/index.ts",
|
|
"types": "./src/index.ts",
|
|
"scripts": {
|
|
"build:native": "node ../../native/scripts/build.js",
|
|
"build:native:dev": "node ../../native/scripts/build.js --dev",
|
|
"test": "node --test src/__tests__/grep.test.mjs"
|
|
},
|
|
"exports": {
|
|
".": {
|
|
"types": "./src/index.ts",
|
|
"import": "./src/index.ts"
|
|
},
|
|
"./grep": {
|
|
"types": "./src/grep/index.ts",
|
|
"import": "./src/grep/index.ts"
|
|
}
|
|
},
|
|
"files": [
|
|
"src"
|
|
],
|
|
"license": "MIT"
|
|
}
|