Forráskód Böngészése

feat(cli.rs): support tauri build on M1 chip (#1915)

imspace 4 éve
szülő
commit
3bf853d782

+ 5 - 0
.changes/build-on-m1.md

@@ -0,0 +1,5 @@
+---
+"cli.rs": patch
+---
+
+Support `cargo tauri build` on Apple M1 chip.

+ 2 - 0
core/tauri-utils/src/platform.rs

@@ -25,6 +25,8 @@ pub fn target_triple() -> crate::Result<String> {
     "x86_64"
   } else if cfg!(target_arch = "arm") {
     "armv7"
+  } else if cfg!(target_arch = "aarch64") {
+    "aarch64"
   } else {
     return Err(crate::Error::Architecture);
   };

+ 2 - 0
tooling/bundler/src/bundle/platform.rs

@@ -18,6 +18,8 @@ pub fn target_triple() -> Result<String, crate::Error> {
     "x86_64"
   } else if cfg!(target_arch = "arm") {
     "armv7"
+  } else if cfg!(target_arch = "aarch64") {
+    "aarch64"
   } else {
     return Err(crate::Error::ArchError(String::from(
       "Unable to determine target-architecture",