百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
J

jstime

> 编程语言
开源

另一个运行时

334 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

另一个运行时

jstime

Another JavaScript runtime

Using the binary

You can find the latest jstime binary on the release page

Alternatively, you can install it with Cargo:

bash
$ cargo install jstime

As a REPL

bash
$ jstime

Welcome to jstime!

>>

Run a script

bash
$ cat hello-world.js
console.log("hello world");

$ jstime hello-world.js
hello world

Performance: JIT Warmup

For benchmarking or performance-critical scripts, use the --warmup flag to allow V8's JIT compiler to optimize the code:

bash
$ jstime --warmup 10 benchmark.js

This runs the script 10 times before the actual execution, allowing TurboFan to profile and optimize hot code paths.

Embed it

Check out the jstime_core README for instructions on how to embed jstime in your Rust application.

Features

jstime provides a minimal and performant JavaScript runtime with essential APIs.

For detailed documentation on all supported features, see Documentation.

** Check out the examples/ directory for runnable code samples!**

Quick Overview

  • Console API: console.log(), console.error(), etc.
  • Timers: setTimeout(), setInterval(), and clearing functions
  • Fetch API: Modern HTTP client with fetch(), Headers, Request, Response
  • Streams API: ReadableStream, WritableStream, TransformStream for streaming data processing
  • URL API: URL and URLSearchParams for URL manipulation
  • Performance API: High-resolution timing with performance.now()
  • Event API: Event and EventTarget for event handling
  • Microtask API: queueMicrotask() for fine-grained async control
  • Structured Clone API: structuredClone() for deep cloning of complex objects
  • Base64 API: atob() and btoa() for base64 encoding/decoding
  • Text Encoding API: TextEncoder and TextDecoder for UTF-8 encoding/decoding
  • Crypto API: crypto.getRandomValues(), crypto.randomUUID(), crypto.subtle.* (digest, sign, verify, encrypt, decrypt)
  • Process API: process.env, process.argv, process.cwd(), process.exit(), process.stdout, process.stderr, process.stdin
  • File System API: Complete Node.js-compatible fs/promises with readFile(), writeFile(), mkdir(), stat(), and more
  • Buffer API: Node.js-compatible Buffer for binary data operations
  • UDP Sockets API: Node.js-compatible dgram module for UDP networking
  • WebAssembly: Full WebAssembly support for running high-performance compiled modules
  • ES Modules: Full support for import/export with top-level await, dynamic import(), and Node.js-compatible node_modules resolution
  • Modern JavaScript: All ES2015+ features via V8 engine

Testing

jstime includes comprehensive test coverage including conformance tests for standard APIs:

  • Console API - WHATWG Console Standard compliance
  • Event API - WHATWG DOM Events compliance
  • Timers API - WHATWG HTML Standard timers compliance
  • Fetch API - WHATWG Fetch Standard compliance
  • Streams API - WHATWG Streams Standard compliance
  • URL API - WHATWG URL Standard compliance
  • Performance API - W3C High Resolution Time compliance
  • Structured Clone API - HTML Standard structured cloning compliance
  • Base64 API - HTML Standard base64 encoding compliance
  • Text Encoding API - WHATWG Encoding Standard compliance
  • Crypto API - W3C Web Cryptography API compliance
  • JSON Modules - ECMAScript JSON modules compliance
  • WebAssembly - WebAssembly specification compliance

Run all tests with:

bash
cargo test

For more details on conformance testing, see core/tests/CONFORMANCE_TESTS.md.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rust

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言