From d4b9f9bfe3159d3b36acb3a7b798378460c638d9 Mon Sep 17 00:00:00 2001 From: Kenneth Mead Date: Sat, 16 Aug 2025 14:38:15 -0400 Subject: [PATCH 1/3] added devcontainer --- .devcontainer/Dockerfile | 48 +++++++++++ .devcontainer/devcontainer.json | 86 +++++++++++++++++++ .devcontainer/scripts/bashrc_addition.sh | 35 ++++++++ .devcontainer/scripts/colors.sh | 19 ++++ .../scripts/ensure-ssh-permissions.sh | 11 +++ .../scripts/functions/get-arch-and-os.sh | 30 +++++++ .../functions/install-rust-toolchain.sh | 17 ++++ .devcontainer/scripts/post-create.sh | 42 +++++++++ .vscode/settings.json | 7 ++ src/lib.rs | 12 +-- 10 files changed, 301 insertions(+), 6 deletions(-) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/scripts/bashrc_addition.sh create mode 100644 .devcontainer/scripts/colors.sh create mode 100644 .devcontainer/scripts/ensure-ssh-permissions.sh create mode 100644 .devcontainer/scripts/functions/get-arch-and-os.sh create mode 100755 .devcontainer/scripts/functions/install-rust-toolchain.sh create mode 100755 .devcontainer/scripts/post-create.sh create mode 100644 .vscode/settings.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..daa418f --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,48 @@ +################################################################################ +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +################################################################################ + +FROM mcr.microsoft.com/devcontainers/rust:latest +ARG USERNAME=vscode +ARG TARGETARCH + +RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -y install \ + curl \ + gcc \ + git \ + openjdk-17-jre \ + zip \ + && \ + rm -rf /var/lib/apt/lists/* + +# Download openfasttrace JARs and create shortcut oft executable +ARG OFT_CORE_VERSION=4.1.0 +ARG OFT_ASCIIDOC_PLUGIN_VERSION=0.3.0 +ENV LIB_DIR=/opt/oft/lib +RUN mkdir -p $LIB_DIR \ + && base_url=https://github.com/itsallcode \ + && wget -P $LIB_DIR ${base_url}/openfasttrace/releases/download/$OFT_CORE_VERSION/openfasttrace-$OFT_CORE_VERSION.jar \ + && wget -P $LIB_DIR ${base_url}/openfasttrace-asciidoc-plugin/releases/download/$OFT_ASCIIDOC_PLUGIN_VERSION/openfasttrace-asciidoc-plugin-$OFT_ASCIIDOC_PLUGIN_VERSION-with-dependencies.jar \ + && echo '#!/bin/bash\n\njava -cp "${LIB_DIR}/*" org.itsallcode.openfasttrace.core.cli.CliStarter "$@"' > /usr/local/bin/oft \ + && chmod +x /usr/local/bin/oft + +# Before installing cargo tools, change to the user that will be used in the container later. +# The reason is that cargo creates some cache, etc. folders with the correct group rustlang, but +# without making them group writable. Easiest fix is to change to the correct user before the install, +# so that the owner is correct from the start. +USER ${USERNAME} + +# Install cargo cli tools +RUN cargo install cargo-nextest cargo-deny cargo-tarpaulin --locked +RUN sudo apt update && \ + sudo apt install -y libclang-dev \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..7ce5aac --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,86 @@ +// ################################################################################ +// # Copyright (c) 2025 Contributors to the Eclipse Foundation +// # +// # See the NOTICE file(s) distributed with this work for additional +// # information regarding copyright ownership. +// # +// # This program and the accompanying materials are made available under the +// # terms of the Apache License Version 2.0 which is available at +// # https: //www.apache.org/licenses/LICENSE-2.0 +// # +// # SPDX-License-Identifier: Apache-2.0 +// ################################################################################ +// +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/rust +{ + "name": "up-transport-iceoryx2-rust", + "build": { + "dockerfile": "Dockerfile" + }, + "runArgs": [ + "--privileged" + ], + "containerEnv": { + "WORKSPACE_FOLDER": "${containerWorkspaceFolder}" + }, + "mounts": [ + { + // This is a workaround which is again necessary on MacOS 14.0, it looks like this bug is back: + // https://github.com/microsoft/vscode-dev-containers/issues/1487#issuecomment-1143907307 + "type": "volume", + "source": "rust-volume", + "target": "/rust-volume" + }, + { + "type": "bind", + "source": "${localWorkspaceFolder}/.devcontainer/scripts", + "target": "/home/vscode/scripts" + }, + { + "type": "bind", + "source": "${localEnv:HOME}${localEnv:USERPROFILE}/.ssh", + "target": "/home/vscode/.ssh" + } + ], + "postCreateCommand": ".devcontainer/scripts/post-create.sh --workspace-folder='${containerWorkspaceFolder}'", + "workspaceMount": "source=${localWorkspaceFolder},target=/workspace/${localWorkspaceFolderBasename}/,type=bind", + "workspaceFolder": "/workspace/${localWorkspaceFolderBasename}/", + "remoteUser": "vscode", + "customizations": { + "vscode": { + // Set *default* container specific settings.json values on container create. + "settings": { + "lldb.executable": "/usr/bin/lldb", + // VS Code don't watch files under ./target + "files.watcherExclude": { + "**/target/**": true + }, + "rust-analyzer.check.command": "clippy", + "rust-analyzer.checkOnSave": true, + "coverage-gutters.coverageBaseDir": "**", + "coverage-gutters.coverageFileNames": [ + "target/tarpaulin/lcov.info" + ] + }, + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "asciidoctor.asciidoctor-vscode", + "bianxianyang.htmlplay", + "bierner.markdown-mermaid", + "bierner.markdown-preview-github-styles", + "davidanson.vscode-markdownlint", + "gxl.git-graph-3", + "hediet.vscode-drawio", + "linusu.auto-dark-mode", + "ms-azuretools.vscode-containers", + "rust-lang.rust-analyzer", + "streetsidesoftware.code-spell-checker", + "tamasfe.even-better-toml", + "timonwong.shellcheck", + "vadimcn.vscode-lldb", + "yzhang.markdown-all-in-one" + ] + } + } +} \ No newline at end of file diff --git a/.devcontainer/scripts/bashrc_addition.sh b/.devcontainer/scripts/bashrc_addition.sh new file mode 100644 index 0000000..9f463f0 --- /dev/null +++ b/.devcontainer/scripts/bashrc_addition.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +if [ -d "$HOME/.ssh" ]; then + source ${WORKSPACE_FOLDER}/.devcontainer/scripts/ensure-ssh-permissions.sh +fi +source ${WORKSPACE_FOLDER}/.devcontainer/scripts/colors.sh + +PRIMARY_COLOR=$COLOR_GRAY +SECONDARY_COLOR=$COLOR_NC +INFO_COLOR=$COLOR_CYAN + +WELCOME_INFO="${SECONDARY_COLOR} +██ ██ ███████ ██ ██████ ██████ ███ ███ ███████ +██ ██ ██ ██ ██ ██ ██ ████ ████ ██ +██ █ ██ █████ ██ ██ ██ ██ ██ ████ ██ █████ +██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ + ███ ███ ███████ ███████ ██████ ██████ ██ ██ ███████ +${PRIMARY_COLOR} +to the Eclipse Foundation ${INFO_COLOR}$(basename "$WORKSPACE_FOLDER")${PRIMARY_COLOR} code repository + +Workspace Folder ${SECONDARY_COLOR}$WORKSPACE_FOLDER + +${INFO_COLOR}Library Version(s)${PRIMARY_COLOR} +Rust Version ${SECONDARY_COLOR}$(rustc --version)${PRIMARY_COLOR} +Cargo Version ${SECONDARY_COLOR}$(cargo --version)${PRIMARY_COLOR} + +${INFO_COLOR}Git${PRIMARY_COLOR} +Username ${SECONDARY_COLOR}$(git config user.name)${PRIMARY_COLOR} +Email ${SECONDARY_COLOR}$(git config user.email)${PRIMARY_COLOR} + +to see this info again, use the ${INFO_COLOR}welcome${PRIMARY_COLOR} command${COLOR_NC} +" + +alias welcome='printf "$WELCOME_INFO"' +welcome diff --git a/.devcontainer/scripts/colors.sh b/.devcontainer/scripts/colors.sh new file mode 100644 index 0000000..103e8ce --- /dev/null +++ b/.devcontainer/scripts/colors.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +export COLOR_NC='\e[0m' # No Color +export COLOR_BLACK='\e[0;30m' +export COLOR_GRAY='\e[1;30m' +export COLOR_RED='\e[0;31m' +export COLOR_LIGHT_RED='\e[1;31m' +export COLOR_GREEN='\e[0;32m' +export COLOR_LIGHT_GREEN='\e[1;32m' +export COLOR_BROWN='\e[0;33m' +export COLOR_YELLOW='\e[1;33m' +export COLOR_BLUE='\e[0;34m' +export COLOR_LIGHT_BLUE='\e[1;34m' +export COLOR_PURPLE='\e[0;35m' +export COLOR_LIGHT_PURPLE='\e[1;35m' +export COLOR_CYAN='\e[0;36m' +export COLOR_LIGHT_CYAN='\e[1;36m' +export COLOR_LIGHT_GRAY='\e[0;37m' +export COLOR_WHITE='\e[1;37m' diff --git a/.devcontainer/scripts/ensure-ssh-permissions.sh b/.devcontainer/scripts/ensure-ssh-permissions.sh new file mode 100644 index 0000000..06feeaa --- /dev/null +++ b/.devcontainer/scripts/ensure-ssh-permissions.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# Sometimes when mounting volumes, the files unexpectedly change their read-write-execute status. +# This is dependent on the OS the Docker container is mounting from, and how it exposes its +# files permissions, ownership, and "executability" to the container and the containers user. +# +# More about specific permissions inside the .ssh folder +# https://serverfault.com/a/253314 +sudo find ~/.ssh -maxdepth 1 -type f -exec chmod 600 {} \; +chmod u+r ~/.ssh/config +chmod u+r ~/.ssh/known_hosts diff --git a/.devcontainer/scripts/functions/get-arch-and-os.sh b/.devcontainer/scripts/functions/get-arch-and-os.sh new file mode 100644 index 0000000..0ae8329 --- /dev/null +++ b/.devcontainer/scripts/functions/get-arch-and-os.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +get_arch_and_os() { + ARCH=$(uname -m) + OS=$(uname -s | tr "[:upper:]" "[:lower:]") + + case "$ARCH" in + x86_64) + TARGET_ARCH="x86_64" + ;; + aarch64 | arm64) + TARGET_ARCH="aarch64" + ;; + *) + echo "Unsupported architecture: $ARCH" + exit 1 + ;; + esac + + case "$OS" in + linux) + TARGET_OS="unknown-linux-gnu" + ;; + *) + echo "OS is unsupported or not implemented in this script: $OS" + exit 1 + ;; + esac + echo "$TARGET_ARCH $TARGET_OS" +} diff --git a/.devcontainer/scripts/functions/install-rust-toolchain.sh b/.devcontainer/scripts/functions/install-rust-toolchain.sh new file mode 100755 index 0000000..c9b6e41 --- /dev/null +++ b/.devcontainer/scripts/functions/install-rust-toolchain.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +install_rust_toolchain() { + source ${WORKSPACE_FOLDER}/.devcontainer/scripts/functions/get-arch-and-os.sh + read -r TARGET_ARCH TARGET_OS <<< "$(get_arch_and_os)" + ARCH_AND_OS="${TARGET_ARCH}-${TARGET_OS}" + echo "Detected architecture and OS: $ARCH_AND_OS" + RUST_TOOLCHAIN="stable-$ARCH_AND_OS" + if rustup toolchain list | grep -q $RUST_TOOLCHAIN; then + echo "Rust toolchain '$RUST_TOOLCHAIN' is already installed." + return 0 + fi + echo "Adding rustup target '$ARCH_AND_OS'" + rustup target add "$ARCH_AND_OS" + echo "Installing Rust toolchain for '$ARCH_AND_OS'" + rustup toolchain install "$RUST_TOOLCHAIN" +} diff --git a/.devcontainer/scripts/post-create.sh b/.devcontainer/scripts/post-create.sh new file mode 100755 index 0000000..522c617 --- /dev/null +++ b/.devcontainer/scripts/post-create.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +#region sudo stuff + +HOST_OS="" +ARCH_AND_OS_FUNC="${WORKSPACE_FOLDER}/.devcontainer/scripts/functions/get-arch-and-os.sh" +if [[ -f "$ARCH_AND_OS_FUNC" ]]; then + source $ARCH_AND_OS_FUNC + read -r _ HOST_OS <<< "$(get_arch_and_os)" +fi +if [[ "$HOST_OS" == "darwin" ]]; then # darwin == Mac OS + # This is a workaround which is againt necessary on MacOS 14.0, it looks like this bug is back: + # https://github.com/microsoft/vscode-dev-containers/issues/1487#issuecomment-1143907307 + # grant permissions to mounted rust volume + echo "(Mac OS only) Granting permissions to mounted rust volume" + sudo chown vscode:vscode /rust-volume + + # create /.cargo/config.toml in root folder + sudo mkdir /.cargo/ + sudo touch /.cargo/config.toml + sudo bash -c "cat << EOF > /.cargo/config.toml + [build] + target-dir = \"/rust-volume/target\" + EOF" +fi + +if ! grep -q "bashrc_addition" ~/.bashrc && [[ -f "${WORKSPACE_FOLDER}/.devcontainer/scripts/bashrc_addition.sh" ]]; then + echo "source ${WORKSPACE_FOLDER}/.devcontainer/scripts/bashrc_addition.sh" >> ~/.bashrc +fi + +#endregion + +for arg in "$@"; do + if [[ "$arg" == --workspace-folder=* ]]; then + WORKSPACE_FOLDER="${arg#--workspace-folder=}" + fi +done +INSTALL_RUST_TOOLCHAIN_FUNC="${WORKSPACE_FOLDER}/.devcontainer/scripts/functions/install-rust-toolchain.sh" +if [[ -f "$INSTALL_RUST_TOOLCHAIN_FUNC" ]]; then + source $INSTALL_RUST_TOOLCHAIN_FUNC + install_rust_toolchain "$@" +fi diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..b80150c --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "workbench.colorCustomizations": { + "activityBar.background": "#422809", + "titleBar.activeBackground": "#5D380D", + "titleBar.activeForeground": "#FDF9F3" + } +} \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index b03e38a..0d4708f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,18 +22,18 @@ impl UTransport for Iceoryx2Transport { async fn register_listener( &self, - _source_filter: &UUri, - _sink_filter: Option<&UUri>, - _listener: Arc, + source_filter: &UUri, + sink_filter: Option<&UUri>, + listener: Arc, ) -> Result<(), UStatus> { todo!() } async fn unregister_listener( &self, - _source_filter: &UUri, - _sink_filter: Option<&UUri>, - _listener: Arc, + source_filter: &UUri, + sink_filter: Option<&UUri>, + listener: Arc, ) -> Result<(), UStatus> { todo!() } From baea05a831a287504972dda31168cfd042411f43 Mon Sep 17 00:00:00 2001 From: Kenneth Mead Date: Sat, 23 Aug 2025 19:49:36 +0000 Subject: [PATCH 2/3] added copyright to nearly everything --- .devcontainer/devcontainer.json | 20 +++++++-------- .devcontainer/scripts/bashrc_addition.sh | 12 +++++++++ .devcontainer/scripts/colors.sh | 12 +++++++++ .../scripts/ensure-ssh-permissions.sh | 12 +++++++++ .../scripts/functions/get-arch-and-os.sh | 12 +++++++++ .../functions/install-rust-toolchain.sh | 12 +++++++++ .devcontainer/scripts/post-create.sh | 12 +++++++++ .gitattributes | 13 ++++++++++ .github/workflows/check.yml | 13 +++++++++- .gitignore | 13 ++++++++++ .vscode/settings.json | 7 ------ Cargo.toml | 13 ++++++++++ src/lib.rs | 25 ++++++++++++++----- 13 files changed, 152 insertions(+), 24 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 7ce5aac..e816c01 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,14 +1,14 @@ // ################################################################################ -// # Copyright (c) 2025 Contributors to the Eclipse Foundation -// # -// # See the NOTICE file(s) distributed with this work for additional -// # information regarding copyright ownership. -// # -// # This program and the accompanying materials are made available under the -// # terms of the Apache License Version 2.0 which is available at -// # https: //www.apache.org/licenses/LICENSE-2.0 -// # -// # SPDX-License-Identifier: Apache-2.0 +// Copyright (c) 2025 Contributors to the Eclipse Foundation +// +// See the NOTICE file(s) distributed with this work for additional +// information regarding copyright ownership. +// +// This program and the accompanying materials are made available under the +// terms of the Apache License Version 2.0 which is available at +// https: //www.apache.org/licenses/LICENSE-2.0 +// +// SPDX-License-Identifier: Apache-2.0 // ################################################################################ // // For format details, see https://aka.ms/devcontainer.json. For config options, see the diff --git a/.devcontainer/scripts/bashrc_addition.sh b/.devcontainer/scripts/bashrc_addition.sh index 9f463f0..6cde26d 100644 --- a/.devcontainer/scripts/bashrc_addition.sh +++ b/.devcontainer/scripts/bashrc_addition.sh @@ -1,4 +1,16 @@ #!/bin/bash +################################################################################ +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https: //www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +################################################################################ if [ -d "$HOME/.ssh" ]; then source ${WORKSPACE_FOLDER}/.devcontainer/scripts/ensure-ssh-permissions.sh diff --git a/.devcontainer/scripts/colors.sh b/.devcontainer/scripts/colors.sh index 103e8ce..2a61843 100644 --- a/.devcontainer/scripts/colors.sh +++ b/.devcontainer/scripts/colors.sh @@ -1,4 +1,16 @@ #!/bin/bash +################################################################################ +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https: //www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +################################################################################ export COLOR_NC='\e[0m' # No Color export COLOR_BLACK='\e[0;30m' diff --git a/.devcontainer/scripts/ensure-ssh-permissions.sh b/.devcontainer/scripts/ensure-ssh-permissions.sh index 06feeaa..86c33b7 100644 --- a/.devcontainer/scripts/ensure-ssh-permissions.sh +++ b/.devcontainer/scripts/ensure-ssh-permissions.sh @@ -1,4 +1,16 @@ #!/bin/bash +################################################################################ +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https: //www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +################################################################################ # Sometimes when mounting volumes, the files unexpectedly change their read-write-execute status. # This is dependent on the OS the Docker container is mounting from, and how it exposes its diff --git a/.devcontainer/scripts/functions/get-arch-and-os.sh b/.devcontainer/scripts/functions/get-arch-and-os.sh index 0ae8329..5df5502 100644 --- a/.devcontainer/scripts/functions/get-arch-and-os.sh +++ b/.devcontainer/scripts/functions/get-arch-and-os.sh @@ -1,4 +1,16 @@ #!/bin/bash +################################################################################ +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https: //www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +################################################################################ get_arch_and_os() { ARCH=$(uname -m) diff --git a/.devcontainer/scripts/functions/install-rust-toolchain.sh b/.devcontainer/scripts/functions/install-rust-toolchain.sh index c9b6e41..3c37033 100755 --- a/.devcontainer/scripts/functions/install-rust-toolchain.sh +++ b/.devcontainer/scripts/functions/install-rust-toolchain.sh @@ -1,4 +1,16 @@ #!/bin/bash +################################################################################ +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https: //www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +################################################################################ install_rust_toolchain() { source ${WORKSPACE_FOLDER}/.devcontainer/scripts/functions/get-arch-and-os.sh diff --git a/.devcontainer/scripts/post-create.sh b/.devcontainer/scripts/post-create.sh index 522c617..fe036f5 100755 --- a/.devcontainer/scripts/post-create.sh +++ b/.devcontainer/scripts/post-create.sh @@ -1,4 +1,16 @@ #!/bin/bash +################################################################################ +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https: //www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +################################################################################ #region sudo stuff diff --git a/.gitattributes b/.gitattributes index 6313b56..d135af2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,14 @@ +# ################################################################################ +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https: //www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ################################################################################ + * text=auto eol=lf diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index cc91e27..4d9deb1 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,4 +1,15 @@ -name: Rust Project CI +################################################################################ +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https: //www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +################################################################################name: Rust Project CI on: push: diff --git a/.gitignore b/.gitignore index ea8c4bf..2a5f86e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,14 @@ +# ################################################################################ +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https: //www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ################################################################################ + /target diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index b80150c..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "workbench.colorCustomizations": { - "activityBar.background": "#422809", - "titleBar.activeBackground": "#5D380D", - "titleBar.activeForeground": "#FDF9F3" - } -} \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 942eae5..9f7e8dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,16 @@ +# ################################################################################ +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https: //www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ################################################################################ + [package] name = "up-transport-iceoryx2-rust" version = "0.1.0" diff --git a/src/lib.rs b/src/lib.rs index 0d4708f..c9c2ee6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,16 @@ +// ################################################################################ +// Copyright (c) 2025 Contributors to the Eclipse Foundation +// +// See the NOTICE file(s) distributed with this work for additional +// information regarding copyright ownership. +// +// This program and the accompanying materials are made available under the +// terms of the Apache License Version 2.0 which is available at +// https: //www.apache.org/licenses/LICENSE-2.0 +// +// SPDX-License-Identifier: Apache-2.0 +// ################################################################################ + use async_trait::async_trait; use std::sync::Arc; use up_rust::{UCode, UListener, UMessage, UStatus, UTransport, UUri}; @@ -22,18 +35,18 @@ impl UTransport for Iceoryx2Transport { async fn register_listener( &self, - source_filter: &UUri, - sink_filter: Option<&UUri>, - listener: Arc, + _source_filter: &UUri, + _sink_filter: Option<&UUri>, + _listener: Arc, ) -> Result<(), UStatus> { todo!() } async fn unregister_listener( &self, - source_filter: &UUri, - sink_filter: Option<&UUri>, - listener: Arc, + _source_filter: &UUri, + _sink_filter: Option<&UUri>, + _listener: Arc, ) -> Result<(), UStatus> { todo!() } From 596a54fc2f7c02565401f3ac2c10e3ffdb30ee9a Mon Sep 17 00:00:00 2001 From: Kenneth Mead Date: Tue, 26 Aug 2025 22:34:36 +0000 Subject: [PATCH 3/3] moved apt install and added EOLs --- .devcontainer/Dockerfile | 8 ++++---- .devcontainer/devcontainer.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index daa418f..61db02e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -15,13 +15,15 @@ FROM mcr.microsoft.com/devcontainers/rust:latest ARG USERNAME=vscode ARG TARGETARCH -RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ - && apt-get -y install \ +RUN apt-get update && \ + export DEBIAN_FRONTEND=noninteractive && \ + apt-get -y install \ curl \ gcc \ git \ openjdk-17-jre \ zip \ + libclang-dev \ && \ rm -rf /var/lib/apt/lists/* @@ -44,5 +46,3 @@ USER ${USERNAME} # Install cargo cli tools RUN cargo install cargo-nextest cargo-deny cargo-tarpaulin --locked -RUN sudo apt update && \ - sudo apt install -y libclang-dev \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e816c01..bb056fc 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -83,4 +83,4 @@ ] } } -} \ No newline at end of file +}