Compile your Rust code to wasm to circumvent having to compile for different architectures.
https://docs.wasmtime.dev/wasm-rust.html