(json: String)
| 9 | use std::str::FromStr; |
| 10 | |
| 11 | pub fn encode_asm_from_json_file(path: String) -> Result<BinaryProgram, String> { |
| 12 | let json_str = std::fs::read_to_string(path).unwrap(); |
| 13 | let bundle: AsmBundle = serde_json::from_str(json_str.as_str()).unwrap(); |
| 14 | let relocated = asm_relocate(bundle).unwrap(); |
| 15 | let program = encode_to_binary(relocated).unwrap(); |
| 16 | Ok(program) |
| 17 | } |
| 18 | |
| 19 | pub(crate) fn encode_to_binary(bundle: RelocatedAsmBundle) -> Result<BinaryProgram, String> { |
no test coverage detected