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_binaryProduces a Rust binary. rust_libraryProduces a Rust library, and provides both rlibanddylibvariants.rust_ffiProduces a Rust C library usable by ccmodules, and provides both static and shared variants.rust_proc_macroProduces a proc-macroRust library. These are analogous to compiler plugins.rust_testProduces a Rust test binary that uses the standard Rust test harness. rust_fuzzProduces a Rust fuzz binary leveraging libfuzzer.rust_protobufGenerates source and produces a Rust library that provides an interface for a particular protobuf. rust_bindgenGenerates source and produces a Rust library containing Rust bindings to C libraries. We will look at
rust_binaryandrust_librarynext.