diff --git a/.devcontainer/Dev.Dockerfile b/.devcontainer/Dev.Dockerfile index be5c98b..d6681f7 100644 --- a/.devcontainer/Dev.Dockerfile +++ b/.devcontainer/Dev.Dockerfile @@ -1,6 +1,6 @@ FROM alpine:latest # Install dependencies -RUN apk add --no-cache --update g++ zsh git ca-certificates curl openssh-client +RUN apk add --no-cache --update g++ zsh git ca-certificates curl openssh-client musl-dev clang lld llvm file # Add my user RUN adduser Entity -h /home/Entity -S --shell /bin/zsh RUN addgroup Entity diff --git a/.gitignore b/.gitignore index 3c1e41e..2aeffc7 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -SSH-Transfer/target \ No newline at end of file +SSH-Transfer/target +SSH-Transfer/SSH-Transfer \ No newline at end of file diff --git a/SSH-Transfer/.cargo/config.toml b/SSH-Transfer/.cargo/config.toml new file mode 100644 index 0000000..aabe38d --- /dev/null +++ b/SSH-Transfer/.cargo/config.toml @@ -0,0 +1,5 @@ +[build] +target = "x86_64-unknown-linux-musl" + +[target.'cfg(target_os = "linux")'] +rustflags = ["-C", "linker=ld.lld", "-C", "relocation-model=static", "-C", "strip=symbols"] \ No newline at end of file diff --git a/SSH-Transfer/Source/App.rs b/SSH-Transfer/Source/App.rs index 171ec37..e9ba9b6 100644 --- a/SSH-Transfer/Source/App.rs +++ b/SSH-Transfer/Source/App.rs @@ -15,10 +15,12 @@ struct CLI fn main() { + #[cfg(debug_assertions)] let Args = CLI::parse(); let CurrentUUID = get_current_uid(); let CurrentUser = get_user_by_uid(CurrentUUID).unwrap(); + #[cfg(debug_assertions)] let CurrentUserName = CurrentUser.name().to_str().unwrap(); let CurrentUserHomeDir = CurrentUser.home_dir().to_str().unwrap(); @@ -26,7 +28,7 @@ fn main() println!("Program running from {} with UUID {}", CurrentUserName, CurrentUUID ); #[cfg(debug_assertions)] println!("{}'s home directory: {}" , CurrentUserName, CurrentUserHomeDir); - + #[cfg(debug_assertions)] println!("Copying from {} to {}/.ssh", Args.Source, CurrentUserHomeDir); VerifySource();