@webprotocol/nwep
v0.1.4
Published
Node.js bindings for quiche-nwep - A QUIC/HTTP/3/NWEP implementation.
Readme
@webprotocol/nwep
Node.js bindings for quiche-nwep - A QUIC/HTTP/3/NWEP implementation.
Installation
Important: This package must be built from within the quiche-nwep workspace. It cannot be installed standalone via npm.
From the quiche-nwep repository:
# Clone the repository
git clone https://github.com/usenwep/quiche-nwep.git
cd quiche-nwep
# Navigate to the node package
cd node
# Install dependencies and build
npm installThe build process will automatically compile the native Rust bindings for your platform.
Requirements
- Rust 1.85+ (install from rustup.rs)
- Node.js 12.22+ / 14.17+ / 15.12+ / 16.0+
- Build tools:
- Linux:
build-essential,cmake,perl - macOS: Xcode Command Line Tools
- Windows: Visual Studio Build Tools or MinGW-w64
- Linux:
Usage
const nwep = require('@webprotocol/nwep')
// Your code hereBuilding
# Build the native addon
npm run build
# Build in debug mode
npm run build:debugThe build script automatically:
- Detects your current platform (Linux, macOS, Windows, etc.)
- Checks for Rust installation
- Compiles the native addon using napi-rs
- Places the compiled
.nodefile in the package directory
Development
This package is part of the quiche-nwep workspace and depends on several workspace crates:
quiche- Core QUIC/HTTP/3 implementationoctets- Buffer manipulationqlog- QUIC logging- And other workspace dependencies
All dependencies are resolved through the workspace, which is why standalone installation is not supported.
Architecture
The package provides Node.js bindings to the Rust quiche library using napi-rs, enabling:
- High-performance QUIC connections
- HTTP/3 support
- NWEP protocol support
- Native speed with JavaScript convenience
License
MIT (for Node.js bindings)
The underlying quiche library is licensed under BSD-2-Clause.
Contributing
Please see the main quiche-nwep repository for contribution guidelines.
