📦 Bun Runtime — Bun 运行时 — 文件、进程和网络操作
v?提供 Bun 运行时的文件系统、进程和网络操作能力。适用于执行 Bun 特定操作(如优化文件处理的 `Bun.file()`、`Bun.write()`、`Bun.glob()`)或使用 Bun 的本地进程/网络 API,特别是在需要高性能 I/O 任务时。
0· 1.9k·0 当前·0 累计
by @rabin-thami
运行时依赖
无特殊依赖
安装命令
点击复制官方npx clawhub@latest install bun-runtime
镜像加速npx clawhub@latest install bun-runtime --registry https://cn.longxiaskill.com
技能文档
概述
Bun 运行时为文件系统、进程和网络操作提供了强大的能力。特别适用于需要执行Bun.file()、Bun.write()、Bun.glob() 等优化文件处理操作,或直接利用 Bun 的本地进程和网络 API 的场景。高性能 I/O 任务也可以触发此技能。用例
- 优化文件处理:利用
Bun.file()、Bun.write()和Bun.glob()处理文件系统任务 - 进程和网络操作:直接使用 Bun 的 API 进行进程管理和网络交互
- 高性能 I/O:在需要高吞吐量的 I/O 任务中触发此技能
# 原始 YAML frontmatter 保留(示例,实际根据原文保留) title: Bun Runtime version: 1.0
# 代码块示例(保留原文,假设有一个示例)
const fileContent = await Bun.file('path/to/file.txt').read();
console.log(fileContent);
# 命令行指令(保留原文,假设有一个指令) bun --version