#car #file-reader #ipfs #reader-writer #command #unpack

app car-utils

此crate是ipfs car文件读取器、写入器和CLI工具

8个版本

0.3.2 2024年5月9日
0.3.1 2024年5月9日
0.2.0 2023年7月27日
0.1.5 2023年5月10日
0.1.1 2023年3月16日

#48WebAssembly

Download history 235/week @ 2024-05-08 8/week @ 2024-05-15 8/week @ 2024-05-22

405 每月下载次数

MIT/Apache

585KB
2K SLoC

car-utils

该项目是用于WASM运行时中CAR文件的工具

如果您想了解WASM运行时,请访问 "https://github.com/blocklessnetwork/runtime/"。

如何安装。

使用cargo install安装CLI

cargo install car-utils

注意:car-utils安装到cargo bin目录。

如何使用。

执行命令car-utils --help以显示命令帮助。

car-utils

Usage: car-utils <COMMAND>

Commands:
  pack    Pack files into a CAR
  unpack  Unpack files and directories from a CAR
  ls      List the car files
  roots   List root CIDs from a CAR
  cat     View cid content from a car file
  help    Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

打包命令

Pack files into a CAR

Usage: car-utils pack [OPTIONS] -o <OUTPUT> <SOURCE>

Arguments:
  <SOURCE>  The source file or directory to be packed

Options:
      --no-wrap    Wrap the file (applies to files only).
  -o <OUTPUT>      The car file to output.
  -h, --help       Print help

解包命令

Unpack files and directories from a CAR

Usage: car-utils unpack [OPTIONS] <CAR>

Arguments:
  <CAR>  The car file to extract

Options:
  -o <OUTPUT>      Target directory to unpack car to.
  -h, --help       Print help

列出命令

List the car files

Usage: car-utils ls <CAR>

Arguments:
  <CAR>  the car file for list.

Options:
  -h, --help  Print help

根命令

List root CIDs from a CAR

Usage: car-utils roots <CAR>

Arguments:
  <CAR>  the car file for list.

Options:
  -h, --help  Print help

查看命令

View cid content from a car file

Usage: car-utils cat -c <CID> <CAR>

Arguments:
  <CAR>  the car file to cat.

Options:
  -c <CID>      the cid of content to cat.
  -h, --help    Print help

依赖项

~2.3–3.5MB
~59K SLoC