@bodhiapp/app-bindings
v0.0.24
Published
NAPI-RS bindings for BodhiApp server with integrated tests
Maintainers
Readme
@bodhiapp/app-bindings
Node.js bindings for BodhiApp server functionality, built with NAPI-RS for high-performance native integration.
Features
- 🚀 High Performance: Native Rust implementation with Node.js bindings
- 🔄 Cross-Platform: Supports macOS, Linux, and Windows
- 📦 Zero Dependencies: Self-contained with platform-specific binaries
- 🔒 Type Safe: Full TypeScript definitions included
- 🧪 Well Tested: Comprehensive test suite with integration tests
Installation
npm install @bodhiapp/app-bindingsSupported Platforms
This package includes pre-built binaries for the following platforms:
| Platform | Architecture | Node.js | |----------|-------------|---------| | macOS | Apple Silicon (ARM64) | >=22 | | Linux | x64 | >=22 | | Windows | x64 | >=22 |
Usage
Basic Usage
import { /* exported functions */ } from '@bodhiapp/app-bindings';
// Example usage will be added based on your actual exportsTypeScript Support
The package includes full TypeScript definitions:
import type { /* types */ } from '@bodhiapp/app-bindings';
// TypeScript intellisense and type checking work out of the boxAPI Reference
Development
This package is part of the BodhiApp project.
Building from Source
If you need to build from source:
# Clone the repository
git clone https://github.com/BodhiSearch/BodhiApp.git
cd BodhiApp/crates/lib_bodhiserver_napi
# Install dependencies
npm install
# Build the native module
npm run build:releaseTesting
# Run unit tests
npm test
# Run integration tests
npm run test:integration
# Run Playwright tests
npm run test:playwrightArchitecture
This package uses NAPI-RS to provide Node.js bindings for Rust code. The architecture follows these principles:
- Platform-specific binaries: Each supported platform gets its own optimized binary
- Automatic loading: The package automatically loads the correct binary for your platform
- Fallback handling: Graceful error handling if binaries are missing
- Development support: Debug builds available for development
Performance
The native Rust implementation provides significant performance benefits over pure JavaScript implementations:
- Memory efficiency: Lower memory usage through Rust's ownership model
- CPU performance: Optimized native code execution
- Concurrent processing: Built-in support for async operations
Contributing
Contributions are welcome! Please see the main repository for contribution guidelines.
Development Setup
- Rust: Install Rust toolchain (1.70+)
- Node.js: Install Node.js (22+)
- Platform tools: Platform-specific build tools may be required
License
MIT License - see the LICENSE file for details.
Support
- Issues: GitHub Issues
- Documentation: Project Documentation
- Community: Discussions
Related Packages
This package is part of the BodhiApp ecosystem:
- BodhiApp: Main application repository
- Desktop App: Cross-platform desktop application built with Tauri
Built with ❤️ using NAPI-RS
