@ai-ecoverse/wasm-util-linux

中文文档
2.42.4-7发布于 2026/10/22GPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-4-Clause-UC AND BSD-3-Clause AND BSD-2-Clause AND MIT零依赖构建来源已验证近 30 天下载 3569

util-linux text tools (rev, column, hexdump, colrm, look, getopt) and flock.

原始使用文档

@ai-ecoverse/wasm-util-linux

The text tools from util-linux 2.42.4 for slicc's wasm realm: rev, column, hexdump, colrm, look, getopt and flock.

pnpm add -g @ai-ecoverse/wasm-util-linux
printf 'abc\n' | rev
column -t -s, data.csv
hexdump -C file.bin
eval set -- "$(getopt -o ab: --long alpha,beta: -- "$@")"

mount and umount are in @ai-ecoverse/wasm-mount, not here. col is not included.

2.42.4-7: flock -F, flock --verbose, notices (homescoop#1465, #1500, #1466; 2026-10-21)

  • flock -F (--no-fork) runs the command in place of flock, as upstream: it holds the lock while it runs, and flock's exit status is the command's. Up to 2.42.4-6 it failed every command with Exec format error (rc 69), because libtool moved the slicc shims archive out of --whole-archive, so execvp reached Emscripten's ENOEXEC stub instead of the shims' execve. The archive now goes to the linker as -Wl,<archive>, which libtool leaves in place, and the build fails unless the flock link line keeps the archive inside --whole-archive and flock.wasm imports the shims' slicc_execve_js, slicc_exec_wait_js and slicc_spawn_capture_js (check-flock-imports.mjs) (#1465, #1468).
  • flock --verbose reports how long getting the lock took. It said 0.000000 seconds after any wait, because CLOCK_MONOTONIC_RAW fails under Emscripten; flock-slicc.patch now times it with CLOCK_MONOTONIC, like -w (#1500).
  • THIRD-PARTY-NOTICES.md carries the copyright and permission notices from the head of each program's main source file (rev.c, column.c, hexdump.c, colrm.c, look.c, getopt.c and flock.c), so flock.c's MIT notice (H. Peter Anvin) ships with flock.wasm, and each BSD notice names its own holder and years (#1466, #1469).
  • util-linux is off scripts/reproducible-pending.json: ladder-pr rebuilds it and compares the tarballs (#808).

2.42.4-5: flock (homescoop#977; 2026-10-20)

flock is new. It wraps a command, or the -c string, in a lock. Use -n to fail at once (rc 1, or the -E code), -w SECONDS to give up after a timeout, or neither to wait. -s, -x, -u, -o and -F work as upstream (-F from 2.42.4-7). The lock is the kernel's flock table, held per open file across processes, so this needs a slicc-kernel with that table (1.132.1 is certified; 1.102.6 has none, and the lock is never contended). In slicc, flock-slicc.patch starts the command with posix_spawnp, because there is no fork(). It also polls a non-blocking lock for -w, because a JS setitimer can't interrupt a blocking flock().

The README no longer names a cert kernel, which went stale whenever cert/meta.json moved (homescoop#847).

版本与发布记录

@ai-ecoverse/wasm-util-linux 共发布 8 个版本,首次发布于 2026/10/09;过去 12 个月发布了 8 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
2.42.4-7latest2026/10/2216 天前
2.42.4-62026/10/2217 天前
2.42.4-52026/10/2117 天前
2.42.4-42026/10/1920 天前
2.42.4-32026/10/1721 天前
2.42.4-22026/10/1622 天前

关于 @ai-ecoverse/wasm-util-linux 的常见问题

@ai-ecoverse/wasm-util-linux 是什么?

util-linux text tools (rev, column, hexdump, colrm, look, getopt) and flock.

如何安装 @ai-ecoverse/wasm-util-linux?

在项目目录运行 npm install @ai-ecoverse/wasm-util-linux,或使用 pnpm add / yarn add / bun add。

@ai-ecoverse/wasm-util-linux 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/ai-ecoverse__wasm-util-linux 是否存在。

@ai-ecoverse/wasm-util-linux 可以商用吗?

@ai-ecoverse/wasm-util-linux 使用 GPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-4-Clause-UC AND BSD-3-Clause AND BSD-2-Clause AND MIT 许可。声明的许可为 GPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-4-Clause-UC AND BSD-3-Clause AND BSD-2-Clause AND MIT,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@ai-ecoverse/wasm-util-linux 的下载量有多少?

根据 npm 官方下载统计,@ai-ecoverse/wasm-util-linux 在 2026/10/05 – 2026/11/03 这 30 天内被下载 3,569 次,日均约 119 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@ai-ecoverse/wasm-util-linux 还在维护吗?

最新版本 2.42.4-7 发布于 2026/10/22(16 天前);至今共发布 8 个版本,其中过去 12 个月发布了 8 个;首次发布于 2026/10/09。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。