工具
WasmLens:探索性 WebAssembly 检查
提供 WebAssembly 区段与函数签名检查、WAT 风格指令列表和有限 C 风格伪代码重建的 Python CLI。所收录的是面向受支持模块的探索性静态分析路径,不代表恢复原始源码或实现完整 WebAssembly 运行时。
使用条件与局限
- 所审阅的包声明版本 0.1.0、Python >=3.10,依赖 Typer、Rich、FastAPI、Uvicorn、Pydantic、NetworkX 与 python-multipart;pytest/httpx 属于开发依赖。源码包含 MIT LICENSE。依赖声明了版本下限,但本次未建立锁文件或经测试的环境。
- info、disasm 和 decompile 命令通过同一解析器读取用户提供的 .wasm 文件。解析器没有 0xFD SIMD 解码分支,可能将不支持的操作码标记为 unknown;本次来源复核不能确认 README 所称的广泛 WebAssembly 2.0 支持。
- WAT 风格模块列表不是无损重汇编格式:数据段仅保留最多 32 字节的预览,活动数据段的偏移使用占位符。C 风格重建器对未处理指令没有通用后备处理,仅取首个返回类型,并以注释表达分支标签;未建立输出可直接编译或与原行为等价。
- 独立模拟器不在本条目支持范围内。所审阅的分派代码缺少浮点算术、间接调用等操作的处理器,遇到未处理指令时可能推进程序计数器而不实现其效果,不应据此充当完整运行时或等价性参照。
- 本次阅读了解析器与反编译器测试定义;基于样例的字符串断言不能证明普遍正确性。未安装包、下载内置 .wasm、执行、反编译或运行测试,也未独立复现 README 中的测试数量/覆盖率徽章。只应提供有权分析的模块。
关于此条目
- 类型
- 工具
- 类别
- WebAssembly 工具
- 关联
- 基础工具
- 目标
- 二进制
来源复核于
说明已依据一手来源复核;这不代表已运行验证、经过安全审计或确认兼容。
一手来源
- README.md GitHub · alexandrmotologa/wasmlens · 修订 2351ccc
- pyproject.toml GitHub · alexandrmotologa/wasmlens · 修订 2351ccc
- LICENSE GitHub · alexandrmotologa/wasmlens · 修订 2351ccc
- src/wasmlens/cli/main.py GitHub · alexandrmotologa/wasmlens · 修订 2351ccc
- src/wasmlens/parser/module.py GitHub · alexandrmotologa/wasmlens · 修订 2351ccc
- src/wasmlens/parser/section_parser.py GitHub · alexandrmotologa/wasmlens · 修订 2351ccc
- src/wasmlens/parser/opcodes.py GitHub · alexandrmotologa/wasmlens · 修订 2351ccc
- src/wasmlens/disassembler/wat_formatter.py GitHub · alexandrmotologa/wasmlens · 修订 2351ccc
- src/wasmlens/decompiler/reconstructor.py GitHub · alexandrmotologa/wasmlens · 修订 2351ccc
- src/wasmlens/decompiler/ast.py GitHub · alexandrmotologa/wasmlens · 修订 2351ccc
- src/wasmlens/emulator/vm.py GitHub · alexandrmotologa/wasmlens · 修订 2351ccc
- tests/test_decompiler.py GitHub · alexandrmotologa/wasmlens · 修订 2351ccc
- tests/test_parser.py GitHub · alexandrmotologa/wasmlens · 修订 2351ccc