(path: String)
| 3 | use std::collections::HashMap; |
| 4 | |
| 5 | pub fn decode_binary_program_from_file(path: String) -> Result<Vec<BinaryInstruction>, String> { |
| 6 | let program_json = std::fs::read_to_string(path) |
| 7 | .map_err(|err| format!("File read to string failed {}", err))?; |
| 8 | let program: BinaryProgram = serde_json::from_str(program_json.as_str()) |
| 9 | .map_err(|err| format!("serde json from string failed {}", err))?; |
| 10 | return decode_binary_program_to_instructions(program); |
| 11 | } |
| 12 | |
| 13 | pub fn decode_binary_program_to_instructions( |
| 14 | program: BinaryProgram, |
nothing calls this directly
no test coverage detected