LoginSignup
0
0

More than 1 year has passed since last update.

Intel MacからApple Silicon Macに移行したら変えるRustの設定

Posted at

TL;DR

以下をターミナルで実行する

rustup default stable-aarch64-apple-darwin

Apple Silicon移行時の問題

Apple Siliconを搭載した新しいMacを購入し、Intel Macからデータを移行したとします。
一部のソフトがIntel版のバイナリで動作しており、Apple Siliconならではのパフォーマンスが引き出せないかもしれません。
Rustも同様です。Apple Silicon向けのツールチェーンをインストールし、Rustからさらにパフォーマンスを引き出しましょう。

ツールチェーンとは?

Rustでいうツールチェーンは、実行環境に係る一連のソフトウェアを指します。
Rustのツールチェーンには以下のソフトが含まれています。

  • コンパイラー rustc
  • ディペンデンシー管理とビルドツール cargo
  • ドキュメント生成 rustdoc
  • 標準ライブラリー

参考: https://stackoverflow.com/questions/62417389/what-exactly-is-a-rust-toolchain

なお、現時点でサポートされているプラットフォームはここで確認できます:
https://doc.rust-lang.org/rustc/platform-support.html
Apple Silicon向けのビルドはTier 2 Supportであるので、ビルドが成功しても実行が成功するとは限りません。今後のApple Silicon Macの普及と共にサポートが向上すると期待できるでしょう。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0