Skip to content

Contributing

BrewedSys edited this page Mar 30, 2026 · 1 revision

Contributing

Thanks for your interest in contributing to Http-native!

Development Setup

Prerequisites

Getting Started

git clone https://github.com/Http-native/http-native.git
cd http-native

# Build the native Rust module
bun run build          # debug
bun run build:release  # optimized

# Run tests
bun run test

# Dev server with hot-reload
bun run dev:hot

Project Structure

http-native/
├── src/          # JavaScript — app API, middleware, bridge
├── rsrc/src/     # Rust — HTTP server, router, session store
├── scripts/      # Build scripts
├── .github/
│   ├── examples/ # Usage examples
│   ├── tests/    # Test suite
│   └── bench/    # Performance benchmarks
├── package.json  # JS config
└── Cargo.toml    # Rust config

Making Changes

JavaScript (src/)

Edit and restart. Hot-reload picks up changes automatically.

Rust (rsrc/src/)

Rebuild after editing:

bun run build          # debug (faster compile)
bun run build:release  # release (optimized)

Commit Messages

Follow Conventional Commits:

feat: add WebSocket broadcast support
fix: correct header parsing for multi-value headers
docs: update middleware examples
perf: optimize radix tree lookups
chore: update napi-rs to v3

Running Tests

bun run test

Running Benchmarks

bun run bench:http-native:static
bun run bench:http-native:dynamic
bun run bench:http-native:opt

Reporting Issues

  • Check existing issues first
  • Include OS, runtime (Node/Bun), and version
  • For bugs, include steps to reproduce

Clone this wiki locally