diff --git a/Dockerfile.multi b/Dockerfile.multi index bd2ca5f..fc9bdfe 100644 --- a/Dockerfile.multi +++ b/Dockerfile.multi @@ -25,6 +25,8 @@ WORKDIR /sdv COPY ./ . +COPY ./container/cargo/config.toml ./.cargo/config.toml + # Check that APP_NAME argument is valid. RUN /sdv/container/scripts/argument_sanitizer.sh \ --arg-value "${APP_NAME}" \ diff --git a/Dockerfile_integrated.multi b/Dockerfile_integrated.multi index 25aa4dc..58b289d 100644 --- a/Dockerfile_integrated.multi +++ b/Dockerfile_integrated.multi @@ -25,6 +25,8 @@ WORKDIR /sdv COPY ./ . +COPY ./container/cargo/config.toml ./.cargo/config.toml + # Check that APP_NAME argument is valid. RUN /sdv/container/scripts/argument_sanitizer.sh \ --arg-value "${APP_NAME}" \ diff --git a/container/cargo/config.toml b/container/cargo/config.toml new file mode 100644 index 0000000..4628343 --- /dev/null +++ b/container/cargo/config.toml @@ -0,0 +1,15 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. +# SPDX-License-Identifier: MIT + +[env] +AGEMO_HOME = { value = ".agemo", relative = true } +AGEMO_SAMPLES_HOME = { value = ".agemo-samples", relative = true } + +[target.aarch64-unknown-linux-gnu] +linker = "aarch64-linux-gnu-gcc" +rustflags = [ "-C", "target-feature=+crt-static", "-C", "link-arg=-lgcc" ] + +[target.x86_64-unknown-linux-gnu] +linker = "x86_64-linux-gnu-gcc" +rustflags = [ "-C", "target-feature=+crt-static", "-C", "link-arg=-lgcc" ] diff --git a/pub-sub-service/Cargo.toml b/pub-sub-service/Cargo.toml index f2410fc..9484ca9 100644 --- a/pub-sub-service/Cargo.toml +++ b/pub-sub-service/Cargo.toml @@ -31,5 +31,5 @@ url = { workspace = true } uuid = { workspace = true, features = [ "v4", "fast-rng", "macro-diagnostics"] } yaml-rust = { workspace = true } -[target.'cfg(target_arch = "aarch64")'.dependencies] +[target.'cfg(any(target_arch = "aarch64", target_arch = "x86_64"))'.dependencies] paho-mqtt = { workspace = true, features = ["vendored-ssl"] }