diff options
Diffstat (limited to 'src/bin/br/formats/clang.rs')
-rw-r--r-- | src/bin/br/formats/clang.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bin/br/formats/clang.rs b/src/bin/br/formats/clang.rs new file mode 100644 index 0000000..30d80de --- /dev/null +++ b/src/bin/br/formats/clang.rs @@ -0,0 +1,10 @@ +pub fn format_clang(bytecode: &[u8]) -> Vec<u8> { + let mut output = String::new(); + for chunk in bytecode.chunks(16) { + for byte in chunk { + output.push_str(&format!("0x{byte:02x}, ")); + } + output.push('\n'); + } + return output.into_bytes(); +} |