Linux command
jco 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Transpile WASM component
jco transpile [component.wasm] -o [output/]
Create component from module
jco componentize [module.wasm] -o [component.wasm]
Inspect component
jco print [component.wasm]
Run component
jco run [component.wasm]
Generate types
jco types [component.wasm] -o [types/]
说明
jco is JavaScript tooling for WebAssembly Components. It transpiles WASM components to JavaScript for browser/Node.js use. The tool works with the component model standard. It generates JavaScript bindings and TypeScript definitions.
参数
- transpile _FILE_
- Convert to JavaScript.
- componentize _FILE_
- Create component from core module.
- print _FILE_
- Print component info.
- run _FILE_
- Execute component.
- types _FILE_
- Generate TypeScript types.
- -o _DIR_
- Output directory.
- --help
- Display help information.
FAQ
What is the jco command used for?
jco is JavaScript tooling for WebAssembly Components. It transpiles WASM components to JavaScript for browser/Node.js use. The tool works with the component model standard. It generates JavaScript bindings and TypeScript definitions.
How do I run a basic jco example?
Run `jco transpile [component.wasm] -o [output/]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does transpile _FILE_ do in jco?
Convert to JavaScript.