Skip to content
Go back

AGB開発環境を作る(WSL+Rust編)

· Updated:
  1. WSLのセットアップ
    • 今回はUbuntu 18.04
  2. Rustのセットアップ
    1. curl https://sh.rustup.rs -sSf | sh
      • nightlyを入れる
    2. rustup component add rust-src
    3. cargo install cargo-xbuild
      • ビルドにはCコンパイラが必要
        • apt-get install gcc
  3. devkitproのセットアップ
    1. https://github.com/devkitPro/pacman/releasesからdevkitpro-pacman.debファイルをダウンロード
    2. dpkg -i ./devkitpro-pacman.deb
    3. dkp-pacman -S gba-dev
    4. /opt/devkitpro/devkitARM/bin/opt/devkitpro/tools/binへのパスを通す
  4. プロジェクトを初期化する
    1. curl https://raw.githubusercontent.com/rust-console/gba/master/init.sh -sSf | bash -s APP_NAME
      • APP_NAMEは適当に決める
  5. ビルド
    1. make
      • libcoreのsimdモジュールがコンパイルできずにエラー
        • とりあえずコメントアウト
      • gbaモジュール周りがエラーになる
        • Cargo.toml[dependencies]gba = { git = "https://github.com/rust-console/gba" }を追加する
      • vscodeでpanic_implのエラーがでる
        • “rust.all_targets”: false
      • https://github.com/rust-lang/rls/issues/904