1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-06-26 18:51:00 +02:00

ja: Translations - Chapter 40 (bare-metal no_std) (#1198)

Part of google#652.
This commit is contained in:
Hidenori Kobayashi
2023-09-26 01:42:56 +00:00
committed by GitHub
parent af9c940f09
commit fc388570bf

View File

@ -12757,15 +12757,15 @@ msgstr ""
#: src/bare-metal/no_std.md:62 #: src/bare-metal/no_std.md:62
msgid "`HashMap` depends on RNG." msgid "`HashMap` depends on RNG."
msgstr "" msgstr "`HashMap`はRNGに依存します。"
#: src/bare-metal/no_std.md:63 #: src/bare-metal/no_std.md:63
msgid "`std` re-exports the contents of both `core` and `alloc`." msgid "`std` re-exports the contents of both `core` and `alloc`."
msgstr "" msgstr "`std`は`core`と`alloc`の両方を再エクスポートします。"
#: src/bare-metal/minimal.md:1 #: src/bare-metal/minimal.md:1
msgid "A minimal `no_std` program" msgid "A minimal `no_std` program"
msgstr "" msgstr "最小限の`no_std`プログラム"
#: src/bare-metal/minimal.md:3 #: src/bare-metal/minimal.md:3
msgid "" msgid ""
@ -12784,21 +12784,27 @@ msgstr ""
#: src/bare-metal/minimal.md:17 #: src/bare-metal/minimal.md:17
msgid "This will compile to an empty binary." msgid "This will compile to an empty binary."
msgstr "" msgstr "このコードは空のバイナリにコンパイルされます。"
#: src/bare-metal/minimal.md:18 #: src/bare-metal/minimal.md:18
msgid "`std` provides a panic handler; without it we must provide our own." msgid "`std` provides a panic handler; without it we must provide our own."
msgstr "" msgstr ""
"パニックハンドラは`std`が提供するので、それを使わない場合は自分で提供する必要"
"があります。"
#: src/bare-metal/minimal.md:19 #: src/bare-metal/minimal.md:19
msgid "It can also be provided by another crate, such as `panic-halt`." msgid "It can also be provided by another crate, such as `panic-halt`."
msgstr "" msgstr ""
"あるいは、`panic-halt`のような別のクレートが提供するパニックハンドラを利用す"
"ることもできます。"
#: src/bare-metal/minimal.md:20 #: src/bare-metal/minimal.md:20
msgid "" msgid ""
"Depending on the target, you may need to compile with `panic = \"abort\"` to " "Depending on the target, you may need to compile with `panic = \"abort\"` to "
"avoid an error about `eh_personality`." "avoid an error about `eh_personality`."
msgstr "" msgstr ""
"ターゲットによっては、`eh_personality`に関するエラーを回避するために`panic = "
"\"abort\"`を指定してコンパイルする必要があります。"
#: src/bare-metal/minimal.md:22 #: src/bare-metal/minimal.md:22
msgid "" msgid ""
@ -12806,12 +12812,17 @@ msgid ""
"define your own entry point. This will typically involve a linker script and " "define your own entry point. This will typically involve a linker script and "
"some assembly code to set things up ready for Rust code to run." "some assembly code to set things up ready for Rust code to run."
msgstr "" msgstr ""
"なお、`main`のようなプログラムの規定エントリポイントはないので、自分でエント"
"リポイントを定義する必要があります。通常、Rustコードを実行できるようにするた"
"めには、リンカスクリプトとある程度のアセンブリコードを必要とします。"
#: src/bare-metal/alloc.md:3 #: src/bare-metal/alloc.md:3
msgid "" msgid ""
"To use `alloc` you must implement a [global (heap) allocator](https://doc." "To use `alloc` you must implement a [global (heap) allocator](https://doc."
"rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html)." "rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html)."
msgstr "" msgstr ""
"`alloc`を使うためには、[グローバル(ヒープ)アロケータ](https://doc.rust-"
"lang.org/stable/std/alloc/trait.GlobalAlloc.html)を実装しなければなりません。"
#: src/bare-metal/alloc.md:6 #: src/bare-metal/alloc.md:6
msgid "" msgid ""
@ -12854,12 +12865,17 @@ msgid ""
"system allocator. Other crates are available, or you can write your own or " "system allocator. Other crates are available, or you can write your own or "
"hook into your existing allocator." "hook into your existing allocator."
msgstr "" msgstr ""
"`buddy_system_allocator`はサードパーティのクレートで、単純なバディシステムア"
"ロケータです。その他にも利用できるクレートはありますし、自前で実装したり、別"
"のアロケータに自分のコードをフックすることも可能です。"
#: src/bare-metal/alloc.md:41 #: src/bare-metal/alloc.md:41
msgid "" msgid ""
"The const parameter of `LockedHeap` is the max order of the allocator; i.e. " "The const parameter of `LockedHeap` is the max order of the allocator; i.e. "
"in this case it can allocate regions of up to 2\\*\\*32 bytes." "in this case it can allocate regions of up to 2\\*\\*32 bytes."
msgstr "" msgstr ""
"パラメータ定数`LockedHeap`はアロケータの最大オーダを示します。この場合、"
"2\\*\\*32バイトの領域を確保することが可能です。"
#: src/bare-metal/alloc.md:43 #: src/bare-metal/alloc.md:43
msgid "" msgid ""
@ -12867,16 +12883,23 @@ msgid ""
"exactly one global allocator defined in your binary. Usually this is done in " "exactly one global allocator defined in your binary. Usually this is done in "
"the top-level binary crate." "the top-level binary crate."
msgstr "" msgstr ""
"もし依存関係にあるクレートが`alloc`に依存する場合、必ずバイナリファイルあたり"
"一つだけのグローバルなアロケータが存在するようにしなければなりません。通常、"
"これはトップレベルのバイナリを生成するクレートにより制御されます。"
#: src/bare-metal/alloc.md:45 #: src/bare-metal/alloc.md:45
msgid "" msgid ""
"`extern crate panic_halt as _` is necessary to ensure that the `panic_halt` " "`extern crate panic_halt as _` is necessary to ensure that the `panic_halt` "
"crate is linked in so we get its panic handler." "crate is linked in so we get its panic handler."
msgstr "" msgstr ""
"`extern crate panic_halt as _` という部分は、`panic_halt`クレートを確実にリン"
"クし、パニックハンドラを利用可能にするために必要です。"
#: src/bare-metal/alloc.md:47 #: src/bare-metal/alloc.md:47
msgid "This example will build but not run, as it doesn't have an entry point." msgid "This example will build but not run, as it doesn't have an entry point."
msgstr "" msgstr ""
"この例で示したコードはビルドできますが、エントリポイントがないので実行するこ"
"とはできません。"
#: src/bare-metal/microcontrollers.md:3 #: src/bare-metal/microcontrollers.md:3
msgid "" msgid ""