Build Rules
์๋๋ก์ด๋ ๋น๋ ์์คํ (Soong)์ ๋ค์๊ณผ ๊ฐ์ ์ฌ๋ฌ ๋ชจ๋์ ํตํด ๋ฌ์คํธ๋ฅผ ์ง์ํ๋ค:
Module Type | Description |
---|---|
rust_binary | ๋ฌ์คํธ ๋ฐ์ด๋๋ฆฌ(Rust binary)๋ฅผ ์์ฑํฉ๋๋ค. |
rust_library | ๋ฌ์คํธ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์์ฑํ๊ณ , rlib ์ dylib variants๋ฅผ ์ ๊ณตํฉ๋๋ค. |
rust_ffi | cc ๋ชจ๋์์ ์ฌ์ฉํ ์ ์๋ Rust C library๋ฅผ ์์ฑํ๊ณ , static and shared variants๋ฅผ ์ ๊ณตํฉ๋๋ค. |
rust_proc_macro | proc-macro Rust library๋ฅผ ์์ฑํฉ๋๋ค. ์ปดํ์ผ๋ฌ ํ๋ฌ๊ทธ์ธ๊ณผ ์ ์ฌํฉ๋๋ค. |
rust_test | standard Rust test harness๋ฅผ ์ฌ์ฉํ๋ ๋ฌ์คํธ ํ ์คํธ ๋ฐ์ด๋๋ฆฌ๋ฅผ ์์ฑํฉ๋๋ค. |
rust_fuzz | libfuzzer ๋ฅผ ์ฌ์ฉํ์ฌ ๋ฌ์คํธ fuzz ๋ฐ์ด๋๋ฆฌ๋ฅผ ์์ฑํฉ๋๋ค. |
rust_protobuf | ์์ค๋ฅผ ์์ฑํ๊ณ ํน์ protobuf์ ๋ํ ์ธํฐํ์ด์ค๋ฅผ ์ ๊ณตํ๋ ๋ฌ์คํธ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์์ฑํฉ๋๋ค. |
rust_bindgen | ์์ค๋ฅผ ์์ฑํ๊ณ C ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ๋ํ ๋ฌ์คํธ ๋ฐ์ธ๋ฉ์ ํฌํจํ๋ ๋ฌ์คํธ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์์ฑํฉ๋๋ค |
๋ค์์ rust_binary
์ rust_library
๋ฅผ ์ดํด๋ด
๋๋ค.
The Android build system (Soong) supports Rust via a number of modules:
Module Type Description rust_binary
Produces a Rust binary. rust_library
Produces a Rust library, and provides both rlib
anddylib
variants.rust_ffi
Produces a Rust C library usable by cc
modules, and provides both static and shared variants.rust_proc_macro
Produces a proc-macro
Rust library. These are analogous to compiler plugins.rust_test
Produces a Rust test binary that uses the standard Rust test harness. rust_fuzz
Produces a Rust fuzz binary leveraging libfuzzer
.rust_protobuf
Generates source and produces a Rust library that provides an interface for a particular protobuf. rust_bindgen
Generates source and produces a Rust library containing Rust bindings to C libraries. We will look at
rust_binary
andrust_library
next.