Skip to content

v1.6.0: High-Performance Edition

Choose a tag to compare

@M-Chris M-Chris released this 09 Oct 22:47
· 108 commits to main since this release

We're excited to announce MoroJS v1.6.0, a major feature release bringing uWebSockets.js integration for single-core multi-threaded performance and full ESM support for modern JavaScript development.

Major Features

uWebSockets.js Support

Unlock extreme single-core performance with optional uWebSockets.js integration:

  • 200k+ req/s on a single core - Achieves multi-core performance without threading
  • Perfect for WebSocket workloads - Native WebSocket support with extreme efficiency
  • Ideal for single-threaded environments - Serverless, containers, edge compute
  • Full HTTP/HTTPS support with SSL/TLS configuration
  • Zero config - just set useUWebSockets: true
  • Graceful fallback to standard Node.js HTTP when not available
  • Production-ready with comprehensive error handling
import { createApp } from '@morojs/moro';

const app = createApp({
  server: {
    useUWebSockets: true,  // 200k+ req/s on single core
    port: 3000
  }
});

When to use:

  • uWebSockets.js: Single-core deployments, WebSocket-heavy apps, edge/serverless environments
  • Clustering: Multi-core servers, traditional HTTP APIs, load distribution

Full ESM Migration

MoroJS now uses native ES modules throughout:

  • Better tree-shaking and bundle optimization
  • Native TypeScript ESM support
  • Improved compatibility with modern tooling
  • Faster startup times
  • Zero breaking changes for existing applications

What's New

Added

  • uWebSockets.js HTTP Server - Single-core multi-threaded performance
  • uWebSockets.js WebSocket Adapter - Native WebSocket support
  • Package Utilities - Smart dependency detection and management
  • Comprehensive Guide - New UWEBSOCKETS_GUIDE.md with examples
  • Validation Scripts - Quality assurance for distributions
  • Benchmark Suite - Performance comparison tools

Enhanced

  • All Core Modules - Updated to ESM syntax
  • WebSocket System - Multi-adapter support
  • Configuration - New useUWebSockets option
  • TypeScript - ESM-compatible type definitions
  • Build System - Optimized for ESM output

Fixed

  • Script import issues in release tooling
  • Package exports for proper ESM resolution
  • TypeScript configuration for module resolution

Performance

Benchmark results (single machine):

Configuration Req/sec Cores Used Use Case
uWebSockets.js 200,000+ 1 core WebSockets, Serverless, Edge
Clustering (4 workers) 200,000+ 4 cores Traditional APIs, Load Distribution
Standard 52,400 1 core Development, Small Projects

Key Insight: uWebSockets.js achieves 4x performance on 1 core vs. clustering on 4 cores - perfect for single-threaded environments and WebSocket workloads.

Migration

No migration required! This release maintains 100% backward compatibility.

Optional: Enable High Performance

// Install uWebSockets.js (optional)
npm install uWebSockets.js

// Enable in your config
const app = createApp({
  server: {
    useUWebSockets: true
  }
});

That's it! The framework automatically uses uWebSockets.js when available.

Documentation

Installation

npm install @morojs/moro@1.6.0

# Optional: For single-core 200k+ req/s
npm install uWebSockets.js

Links


Full Changelog: v1.5.17...v1.6.0