Skip to content

discere-os/boost.chrono.wasm

 
 

Repository files navigation

@discere-os/boost.chrono.wasm

WebAssembly port of Boost.Chrono - High-performance time utilities and clock operations with C++11 compatibility and SIMD optimizations.

CI/CD JSR npm version License Status

Features

  • High-Precision Time Utilities: Boost.Chrono time measurement and manipulation
  • Cross-Platform Clock Operations: Steady, system, and high-resolution clocks
  • Duration Arithmetic: Type-safe duration calculations and conversions
  • C++11 Standard Compatibility: Full compliance with C++11 chrono interface
  • SIMD Optimizations: Enhanced performance for time-critical operations
  • WebAssembly Native: Compiled with Emscripten for optimal browser performance
  • TypeScript Integration: Complete type definitions and modern API

Quick Start

# Install via npm
npm install @discere-os/boost.chrono.wasm

# Or use with Deno
import BoostChrono from "https://deno.land/x/boost_chrono_wasm/mod.ts"

Usage

import BoostChrono from '@discere-os/boost.chrono.wasm'

const chrono = new BoostChrono()
await chrono.initialize()

// High-resolution timing
const start = chrono.high_resolution_now()
// ... perform operations ...
const end = chrono.high_resolution_now()
const elapsed = chrono.duration_cast_microseconds(end - start)

console.log(`Operation took ${elapsed} microseconds`)

Original Boost.Chrono

Boost.Chrono provides:

  • Clocks: system_clock, steady_clock, high_resolution_clock
  • Time Points: Precise moment-in-time representations
  • Durations: Type-safe time interval arithmetic
  • I/O Facilities: Formatted time output and parsing
  • Thread Safety: Safe concurrent time operations

Useful time utilities with full C++11 compatibility.

Original License

Distributed under the Boost Software License, Version 1.0.

💖 Support This Work

This WebAssembly port is part of a larger effort to bring professional desktop applications to browsers with native performance.

👨‍💻 About the Maintainer: Isaac Johnston (@superstructor) - Building foundational browser-native computing infrastructure through systematic C/C++ to WebAssembly porting.

📊 Impact: 70+ open source WASM libraries enabling professional applications like Blender, GIMP, and scientific computing tools to run natively in browsers.

🚀 Your Support Enables:

  • Continued maintenance and updates
  • Performance optimizations
  • New library ports and integrations
  • Documentation and tutorials
  • Cross-browser compatibility testing

💖 Sponsor this work to help build the future of browser-native computing.

Releases

No releases published

Packages

No packages published

Languages

  • C++ 99.4%
  • Other 0.6%