7个版本
0.2.5 | 2023年3月3日 |
---|---|
0.2.4 | 2023年2月1日 |
0.2.2 | 2023年1月31日 |
0.1.0 | 2023年1月28日 |
在 编程语言 中排名第827
每月下载量32次
7KB
110 代码行
🚀 Sour
一个可定制的命令行brainfuck解释器。
安装
使用 Cargo 构建
$ git clone https://github.com/naakaamura/sour.git
$ cd sour
$ cargo build --release
从 Crates.io 安装
$ cargo install sour
使用方法
Usage: sour [OPTIONS] <CONTENT>
Arguments:
<CONTENT> The brainfuck content or path to brainfuck file
Options:
-s, --size <SIZE> The memory buffer size [default: 30000]
-r, --raw Whether to output raw bytes or encode to ASCII
-h, --help Print help
-V, --version Print version
示例
从文件中解释
$ sour hello-world.bf
# OUTPUT: Hello, world!
从文件中解释原始字节值
$ sour hello-world.bf -r
# OUTPUT: 72 101 108 108 111 44 32 87 111 114 108 100 33
从原始brainfuck内容中解释
$ sour +++++.
# OUTPUT: ♣
使用自定义内存缓冲区大小进行解释
$ sour <CONTENT> -s 69420
依赖项
~1.2–1.8MB
~35K SLoC