Generate an ISA from an architecture string (e.g. "x86_64").
(arch: &str)
| 25 | |
| 26 | /// Generate an ISA from an architecture string (e.g. "x86_64"). |
| 27 | pub fn isa_from_arch(arch: &str) -> Result<isa::Isa, String> { |
| 28 | isa::Isa::from_arch(arch).ok_or_else(|| format!("no supported isa found for arch `{arch}`")) |
| 29 | } |
| 30 | |
| 31 | /// Generates all the Rust source files used in Cranelift from the meta-language. |
| 32 | pub fn generate_rust(isas: &[isa::Isa], out_dir: &std::path::Path) -> Result<(), error::Error> { |