Skip to content

ch01の更新 #274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master-ja
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 7 additions & 23 deletions src/ch01-01-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,31 +126,15 @@ Linuxユーザは、通常はディストリビューションのドキュメン
<!--
On Windows, go to [https://www.rust-lang.org/tools/install][install] and follow
the instructions for installing Rust. At some point in the installation, you’ll
receive a message explaining that you’ll also need the MSVC build tools for
Visual Studio 2013 or later.
be prompted to install Visual Studio. This provides a linker and the native
libraries needed to compile programs. If you need more help with this step, see
[https://rust-lang.github.io/rustup/installation/windows-msvc.html][msvc]
-->

Windowsでは、[https://www.rust-lang.org/tools/install][install]に行き、手順に従ってRustをインストールしてください。
インストールの途中で、Visual Studio 2013以降用のMSVCビルドツールも必要になるという旨のメッセージが出るでしょう。

<!--
To acquire the build tools, you’ll need to install [Visual Studio
2022][visualstudio]. When asked which workloads to install, include:
-->

ビルドツールを取得するには、[Visual Studio 2022][visualstudio]をインストールする必要があるでしょう。
どのワークロード (workloads) をインストールするかと質問されたときは、以下を含めてください:

<!--
* “Desktop Development with C++”
* The Windows 10 or 11 SDK
* The English language pack component, along with any other language pack of
your choosing
-->

* 「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の言語を日本語にしている場合は言語パックのところで「日本語」が選択されており、そのままの設定でインストールしても基本的に問題ないはずです。しかし、サードパーティーのツールやライブラリの中には英語の言語パックを必要とするものがあるため、「日本語」に加えて「英語」も選択することをお勧めします。

Expand Down Expand Up @@ -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
4 changes: 3 additions & 1 deletion src/ch01-03-hello-cargo.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`を実行することで自動的に生成することもできます。

<!--
### Building and Running a Cargo Project
Expand Down