brainfuck interpreter
brainfuck cli rust
5

Configure Feed

Select the types of activity you want to include in your feed.

feat: implemented tracing flag in VM, VMBuilder, and CLI args

digi.rip (Jun 3, 2026, 10:23 AM EDT) 188f313c b93f9b25

+17
+9
src/evaluator.rs
··· 50 50 cell_oob: OOBBehavior, 51 51 input_type: IOFormat, 52 52 output_type: IOFormat, 53 + tracing: bool, 53 54 } 54 55 55 56 pub struct VMBuilder { ··· 58 59 cell_oob: OOBBehavior, 59 60 input_type: IOFormat, 60 61 output_type: IOFormat, 62 + tracing: bool, 61 63 } 62 64 63 65 impl VMBuilder { ··· 68 70 cell_oob: OOBBehavior::Wrap, 69 71 input_type: IOFormat::Ascii, 70 72 output_type: IOFormat::Ascii, 73 + tracing: false, 71 74 } 72 75 } 73 76 ··· 96 99 self 97 100 } 98 101 102 + pub fn tracing(mut self, flag: bool) -> Self { 103 + self.tracing = flag; 104 + self 105 + } 106 + 99 107 pub fn build(self) -> VM { 100 108 VM { 101 109 tape: self.tape, ··· 105 113 cell_oob: self.cell_oob, 106 114 input_type: self.input_type, 107 115 output_type: self.output_type, 116 + tracing: self.tracing, 108 117 } 109 118 } 110 119 }
+8
src/main.rs
··· 34 34 35 35 #[arg(short, long, help = "set output type", default_value = "ascii")] 36 36 output_type: IOFormat, 37 + 38 + #[arg( 39 + short, 40 + help = "print tape state after every run cycle", 41 + default_value = "false" 42 + )] 43 + tracing: bool, 37 44 } 38 45 39 46 // think: switch to returning anyhow::Error? better diag ··· 49 56 .cell_oob(args.cell_oob) 50 57 .input_type(args.input_type) 51 58 .output_type(args.output_type) 59 + .tracing(args.tracing) 52 60 .build(); 53 61 machine.run( 54 62 &tokens,