rustdex
v0.4.3
Published
A high-performance, universal code-indexer and semantic search tool built in Rust
Maintainers
Readme
RustDex npm package
This directory contains the npm package for RustDex, which allows users to install the RustDex binary via npm:
npm install -g rustdexHow it works
The npm package acts as a wrapper that:
- Detects the user's platform and architecture
- Downloads the appropriate binary from GitHub Releases
- Installs it to the npm global bin directory
Publishing
To publish to npm:
- Update
GITHUB_REPOininstall.jswith your GitHub username - Update author and repository URLs in
package.json - Ensure you have an npm account:
npm adduser - Publish:
npm publish
Publishing Checklist
- [ ] Update version in
package.jsonto match RustDex release - [ ] Create GitHub release with binaries (use the workflow)
- [ ] Update
GITHUB_REPOininstall.js - [ ] Test installation on each platform
- [ ] Run
npm publish
Version Management
The npm package version should match the RustDex release version. When you release a new version of RustDex:
- Update
package.jsonversion - Create GitHub release with binaries
- Publish to npm:
npm publish
Platform Support
Currently supports:
- macOS: arm64 (Apple Silicon), x64 (Intel)
- Linux: arm64, amd64
- Windows: arm64, amd64
Troubleshooting
Installation fails
- Check if the release exists on GitHub
- Verify your platform is supported
- Ensure you have network access
- On Windows: Ensure you have PowerShell or install adm-zip
- On Unix: Ensure you have
unzipinstalled
Binary not found
The binary is installed to:
- npm global bin directory (typically
/usr/local/binon macOS/Linux) - Check with:
npm config get prefix
Testing locally
Before publishing, you can test the installation:
cd npm
npm link
rustdex --version
npm unlink -g rustdexDependencies
node-fetch: For downloading binaries (optional, using native modules)adm-zip: For extracting on Windows (will be added if needed)
Note: The current implementation uses native unzip on Unix and PowerShell on Windows to avoid heavy dependencies. For better Windows support, consider adding adm-zip as a dependency.
