File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// ref: https://github.com/devcontainers/spec/blob/main/schemas/devContainerFeature.schema.json
22{
33 "id" : " rust" ,
4- "version" : " 8.0.3 " ,
4+ "version" : " 8.0.4 " ,
55 "name" : " Development Container Feature - Rust" ,
66 "documentationURL" : " https://github.com/georglauterbach/dev-container-features/tree/main/src/rust" ,
77 "description" : " Work efficiently and effortlessly with the Rust programming language" ,
Original file line number Diff line number Diff line change 55. /etc/os-release
66
77if [ " ${ID} " = " alpine" ]; then
8- apk add --no-cache bash coreutils gcompat libgcc
8+ apk add --no-cache bash coreutils gcompat
99fi
1010
1111exec /bin/bash " $( dirname " ${0} " ) /install_actual.sh" " ${@ } "
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ readonly CURRENT_DIR
1313# shellcheck source=./common.sh
1414source " ${CURRENT_DIR} /common.sh"
1515
16+ source /etc/os-release
17+
1618readonly DATA_DIR=" ${DATA_BASE_DIR} /rust"
1719mkdir -p " ${DATA_DIR} "
1820
@@ -145,7 +147,12 @@ function install_rustup() {
145147 fi
146148
147149 if [[ -z ${RUST_RUSTUP_RUSTUP_INIT_HOST_TRIPLE} ]]; then
148- RUST_RUSTUP_RUSTUP_INIT_HOST_TRIPLE=" $( uname -m) -unknown-linux-gnu"
150+ RUST_RUSTUP_RUSTUP_INIT_HOST_TRIPLE=" $( uname -m) -unknown-linux-"
151+ if [[ ${ID} == ' alpine' ]]; then
152+ RUST_RUSTUP_RUSTUP_INIT_HOST_TRIPLE+=' musl'
153+ else
154+ RUST_RUSTUP_RUSTUP_INIT_HOST_TRIPLE+=' gnu'
155+ fi
149156 log ' debug' " Host triple set to '${RUST_RUSTUP_RUSTUP_INIT_HOST_TRIPLE} '"
150157 fi
151158
@@ -182,7 +189,7 @@ function additional_rust_setup() {
182189 cp " ${CURRENT_DIR} /prettifier_for_lldb.py" " ${DATA_DIR} /prettifier_for_lldb.py"
183190
184191 if ! command -v rustup & > /dev/null; then
185- log ' warn' " Command 'rustup' could not be located but is required for the mojority of the additional setup steps"
192+ log ' warn' " Command 'rustup' could not be located but is required for the majority of the additional setup steps"
186193 return 0
187194 fi
188195
You can’t perform that action at this time.
0 commit comments