跳到正文

正在自动登录…

← 返回项目列表

stencil-hq/dquickts

持久化执行TypeScript运行

这是一个基于QuickJS的JavaScript引擎分支,增加了持久化执行和原生TypeScript支持,适用于需要跨进程恢复运行状态的场景。

AI 中文解读 · 根据仓库描述与 README 生成 · 2026/10/24 04:26:43 · 查看原文

值得看C应用与服务
累计 Stars
374
当前热度
1~7 天 · 小火
仓库创建时间
打开 GitHub ↗

选用指南

AI 根据 README 整理 · 2026/10/24 04:26:43

使用方式

通过命令行使用,支持直接运行TypeScript文件,也提供REPL模式。

查看 README 依据
git clone https://github.com/stencil-hq/dquickts cd dquickts make # builds qjs, qjsc and libquickjs.a ./qjs hello.ts ./qjs --drepl session.snap # a REPL whose state survives restarts make test-snapshot # builds and runs the suspension and snapshot test hosts ``` ## Contents - [What this fork adds](#what-this-fork-adds) - [Durable REPL](#durable-repl) - [Snapshots](#snapshots) - [What a snapshot is](#what-a-snapshot-is) - [When you can take one](#when-you-can-take-one) - [Example: hibernating in the middle of a loop](#example-hibernating-in-the-middle-of-a-loop)
部署要求

需要从源码编译,依赖C编译器和make工具。

查看 README 依据
git clone https://github.com/stencil-hq/dquickts cd dquickts make # builds qjs, qjsc and libquickjs.a ./qjs hello.ts ./qjs --drepl session.snap # a REPL whose state survives restarts make test-snapshot # builds and runs the suspension and snapshot test hosts ``` ## Contents - [What this fork adds](#what-this-fork-adds) - [Durable REPL](#durable-repl) - [Snapshots](#snapshots) - [What a snapshot is](#what-a-snapshot-is) - [When you can take one](#when-you-can-take-one) - [Example: hibernating in the middle of a loop](#example-hibernating-in-the-middle-of-a-loop)
已知限制

快照只能加载到写入它的同一构建版本中;不支持包含Intl或Temporal上下文的快照;同一时间只能有一个挂起的执行。

查看 README 依据
- The `std` and `os` modules are not available. Their files, timers and handlers are host state that a snapshot cannot save. - `\load file` evaluates a file inside the session. - Ctrl-C interrupts a running command. The session is not affected. - A session file only loads into the `qjs` build that wrote it. - Tab completion lists properties of the global object. Like the regular REPL, it does not list top-level `let`, `const` and `class` names, but it does complete their members (`c.in` → `c.inc()`). ## Snapshots ### What a snapshot is
a restore: the interrupt handler, module loader, memory and stack limits, promise rejection tracker, context opaque pointers, and locale callbacks. Modules imported after the restore go through the new runtime's loader. - **Buffers.** `ArrayBuffer` data is always restored into memory the engine owns. Host buffers are copied, and their free functions are not kept. ### Limitations - `JS_WriteSnapshot()` throws a `TypeError` for: - contexts with the Intl or Temporal intrinsics, - `SharedArrayBuffer`s whose memory may be shared with another thread,
- host-class objects with opaque data when there is no `save_opaque()` hook, - C closures (`JS_NewCClosure()`), whose opaque pointer is host state, - any call made while JS code is running on the C stack. - A runtime can have only one suspended execution at a time. - If a suspended frame cannot be resumed (stack overflow, or the interrupt handler interrupts it), it and its callees are terminated without running `catch`/`finally` blocks or `using` disposals. The error is thrown at the frame's call site.

README

正在加载 README…

收录信息

仓库创建时间
2026/10/19 20:06:42
首次达标收录
2026/10/24 04:21:36
统计更新时间
2026/10/24 17:21:05

按创建时长与累计 Stars 判断等级。首次达标收录后,即使未达当前门槛仍保留;累计 Stars 和仓库状态会定期更新。确认只有 README 及辅助文件的仓库会停止公开。

模型评估

值得看加权总分 4.0 / 5

新颖度
4.0
实用价值
3.9
成熟度
4.5
实质含量
4.0

由 Jev 模型根据仓库描述与 README 评估,2026/10/24 04:21:36 生成。评分仅供参考,不是代码、安全或许可证审查;热度等级另按创建时长与累计 Stars 计算。

仓库信息

最近推送
2026/10/21 03:17:57
许可证标识
NOASSERTION
Fork 数
5
当前状态
未归档

收录记录

按创建时长与累计 Stars 首次收录:小火
首次发现项目