From 9f7cf3b00b90796615bb93ebbbdaf54685a12d6b Mon Sep 17 00:00:00 2001 From: Kaname Sasaki Date: Tue, 28 Jan 2025 14:45:13 +0100 Subject: [PATCH 1/2] Update MSVC instructions --- src/ch01-01-installation.md | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/src/ch01-01-installation.md b/src/ch01-01-installation.md index 80baff2c..6cd1403c 100644 --- a/src/ch01-01-installation.md +++ b/src/ch01-01-installation.md @@ -126,31 +126,15 @@ Linuxユーザは、通常はディストリビューションのドキュメン Windowsでは、[https://www.rust-lang.org/tools/install][install]に行き、手順に従ってRustをインストールしてください。 -インストールの途中で、Visual Studio 2013以降用のMSVCビルドツールも必要になるという旨のメッセージが出るでしょう。 - - - -ビルドツールを取得するには、[Visual Studio 2022][visualstudio]をインストールする必要があるでしょう。 -どのワークロード (workloads) をインストールするかと質問されたときは、以下を含めてください: - - - -* 「C++によるデスクトップ開発」(“Desktop Development with C++”) -* Windows 10または11のSDK -* 英語の言語パック (English language pack) コンポーネント (お好みで他の任意の言語パックも) +インストールの途中で、Visual Studioをインストールするよう求められるはずです。 +Visual Studioは、プログラムのコンパイルに必要となる、リンカーとネイティブライブラリを提供します。 +この手順について、さらにヘルプが必要な場合は、[https://rust-lang.github.io/rustup/installation/windows-msvc.html][msvc]を参照してください。 > 訳注:Windowsの言語を日本語にしている場合は言語パックのところで「日本語」が選択されており、そのままの設定でインストールしても基本的に問題ないはずです。しかし、サードパーティーのツールやライブラリの中には英語の言語パックを必要とするものがあるため、「日本語」に加えて「英語」も選択することをお勧めします。 @@ -305,5 +289,5 @@ sure what it does or how to use it, use the application programming interface [otherinstall]: https://forge.rust-lang.org/infra/other-installation-methods.html [install]: https://www.rust-lang.org/tools/install -[visualstudio]: https://visualstudio.microsoft.com/downloads/ +[msvc]: https://rust-lang.github.io/rustup/installation/windows-msvc.html [community]: https://www.rust-lang.org/community From dbfcf70b6f1ee8a86fe04aa8cd2b9a1d10e8f5c5 Mon Sep 17 00:00:00 2001 From: Kaname Sasaki Date: Tue, 28 Jan 2025 14:54:24 +0100 Subject: [PATCH 2/2] Update description on Cargo.toml generation --- src/ch01-03-hello-cargo.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ch01-03-hello-cargo.md b/src/ch01-03-hello-cargo.md index d925594f..1a20e488 100644 --- a/src/ch01-03-hello-cargo.md +++ b/src/ch01-03-hello-cargo.md @@ -231,11 +231,13 @@ Cargoを使うとプロジェクトを整理することができます。 If you started a project that doesn’t use Cargo, as we did with the “Hello, world!” project, you can convert it to a project that does use Cargo. Move the project code into the *src* directory and create an appropriate *Cargo.toml* -file. +file. One easy way to get that _Cargo.toml_ file is to run `cargo init`, which +will create it for you automatically. --> 「Hello, world!」プロジェクトのようにCargoを使用しないプロジェクトを開始したときでも、Cargoを使用するプロジェクトへと変換できます。 プロジェクトのコードを*src*ディレクトリに移動し、適切な*Cargo.toml*ファイルを作成すればいいのです。 +この*Cargo.toml*ファイルは、`cargo init`を実行することで自動的に生成することもできます。