Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Rong (融) - Multi-Engine JavaScript Runtime for Rust
Rong (融, meaning "fusion" in Chinese) is a specialized JavaScript runtime for Rust designed for LingXia App and microservices in constrained environments. It provides a lightweight, secure JavaScript execution environment optimized for specific use cases rather than general-purpose Node.js replacement.
🌟 Why "Rong" (融)?
The name "Rong" (融) embodies the core philosophy of this project:
- Fusion: Seamlessly merges JavaScript engines with Rust native code
- Harmony: Creates harmonious integration between different runtime environments
- Unity: Unifies multiple JavaScript engines under a single, elegant API
- Flow: Enables smooth data flow between JavaScript and Rust worlds
In Chinese culture, "融" represents natural harmony and coexistence - perfectly capturing how Rong brings together diverse technologies into a unified whole.
Features
Multi-Engine Support
- QuickJS - Lightweight and fast
- JavaScriptCore - WebKit's production-ready engine
- ArkJS - HarmonyOS JavaScript engine 🚧 In Development
Developer Experience
- Zero-cost abstractions - Minimal runtime overhead
- Type-safe bindings - Rust's type system ensures memory safety
- Async/await support - Full Promise and async iterator integration
- Rich module ecosystem - Built-in modules for common tasks
Architecture
- Unified API - Same code works across all engines
- Memory efficient - Careful resource management
- Thread-safe - Safe concurrent access patterns
- Extensible - Easy to add custom modules and bindings
┌─────────────────────────────────────────────────────────────┐
│ Rong Core │
├─────────────────────────────────────────────────────────────┤
│ Unified API │ Type System │ Memory Management │ Async/Await │
├─────────────────────────────────────────────────────────────┤
│ QuickJS │ JavaScriptCore │ ArkJS │
├─────────────────────────────────────────────────────────────┤
│ Built-in Modules & Extensions │
│ Timer │ HTTP │ FS │ Console │ Path │ URL │ ... │
└─────────────────────────────────────────────────────────────┘
🚀 Quick Start
use *;
For more examples including class bindings, async functions, and advanced features, see the Module Development Guide.
📦 Built-in Modules
Rong comes with a rich set of built-in modules:
- rong_timer - setTimeout, setInterval, async timers
- rong_http - HTTP client/server, fetch API
- rong_fs - File system operations
- rong_console - Console logging and debugging
- rong_url - URL parsing and manipulation
- rong_buffer - Binary data handling
- rong_event - Event emitter and handling
- rong_abort - AbortController and signals
- rong_encoding - Text encoding/decoding
- rong_assert - Assertion utilities
- rong_storage - Storage APIs
- rong_stream - Stream APIs
- rong_path - Path manipulation
- rong_process - Process information and environment
- rong_child_process - Child process management
- rong_exception - Exception handling
- rong_navigator - Navigator APIs
📚 Documentation
Comprehensive guides for working with Rong:
- Module Development Guide - Learn how to create Rust-driven JavaScript APIs and classes
- Value System Guide - Understand type conversion between Rust and JavaScript
- Error Handling Guide - Best practices for error handling
- Testing Guide - How to run and write tests
📄 License
This project is licensed under either the MIT License or the Apache License 2.0, at your option. See LICENSE-MIT and LICENSE-APACHE for details.
🙏 Acknowledgments
- QuickJS team for the lightweight JavaScript engine
- WebKit team for JavaScriptCore
- HarmonyOS team for ArkJS
- Rust community for excellent async ecosystem
Rong (融) - Fusing JavaScript engines with Rust, creating harmony in diversity.