8 releases (5 breaking)

0.16.0 Nov 21, 2024
0.15.1 May 8, 2023
0.14.0 Jul 14, 2022
0.13.0 Apr 10, 2022
0.11.2 Feb 26, 2022

#427 in Programming languages

Download history 8/week @ 2024-09-20 2/week @ 2024-09-27 2/week @ 2024-10-11 1/week @ 2024-11-01 1/week @ 2024-11-08 93/week @ 2024-11-15 53/week @ 2024-11-22 3/week @ 2024-11-29 2/week @ 2024-12-06

151 downloads per month

MPL-2.0 license

110KB
2.5K SLoC

cambridge-asm-cli

GitHub Actions Workflow Status Crates.io

Command line interface to execute pseudoassembly programs

Usage

casm -h

Cambridge Pseudoassembly Interpreter x.y.z
Saadi Save <github.com/SaadiSave>
Run pseudoassembly from Cambridge International syllabus 9618 (2021)

USAGE:
    casm <SUBCOMMAND>

OPTIONS:
    -h, --help       Print help information
    -V, --version    Print version information

SUBCOMMANDS:
    compile    Compile pseudoassembly
    help       Print this message or the help of the given subcommand(s)
    run        Run compiled or plaintext pseudoassembly

casm help run

Run compiled or plaintext pseudoassembly

Usage: casm run [OPTIONS] <PATH>

Arguments:
  <PATH>  Path to the input file containing compiled or plaintext pseudoassembly

Options:
  -v, --verbose...       Increase logging level
  -t, --bench            Show execution time
  -f, --format <FORMAT>  Format of input file [default: pasm] [possible values: pasm, json, ron, yaml, cbor]
  -h, --help             Print help

casm help compile

Compile pseudoassembly

Usage: casm compile [OPTIONS] <INPUT>

Arguments:
  <INPUT>  Path to the input file containing pseudoassembly

Options:
  -o, --output <OUTPUT>  Path to output file
  -v, --verbose...       Increase logging level
  -f, --format <FORMAT>  Format of output file [default: json] [possible values: json, ron, yaml, cbor]
  -m, --minify           Minify output
  -d, --debug            Include debuginfo
  -h, --help             Print help

Log levels

  • OFF by default
  • -v = WARN: Enable warnings
  • -vv = INFO: Enable info logs
  • -vvv = DEBUG: Enable debugging logs
  • -vvvv = TRACE: Trace execution line by line

WARN

Arithmetic overflows are logged as warnings.

INFO

General status is logged as info.

DEBUG

Steps in the parsing procedure and internal structs created are shown in debug logs

TRACE

Line-by-line execution is logged

Dependencies

~7.5MB
~116K SLoC