diff --git a/.gitignore b/.gitignore index 4bfe55c..aa2d529 100644 --- a/.gitignore +++ b/.gitignore @@ -41,7 +41,6 @@ yalc.lock # ignore Rust compiler files /backend-rs/target -backend /bin/backend # packaged teasers diff --git a/backend-rs/Cargo.lock b/backend/Cargo.lock similarity index 100% rename from backend-rs/Cargo.lock rename to backend/Cargo.lock diff --git a/backend-rs/Cargo.toml b/backend/Cargo.toml similarity index 100% rename from backend-rs/Cargo.toml rename to backend/Cargo.toml diff --git a/backend-rs/Cross.toml b/backend/Cross.toml similarity index 100% rename from backend-rs/Cross.toml rename to backend/Cross.toml diff --git a/backend/Dockerfile b/backend/Dockerfile new file mode 100644 index 0000000..f46e170 --- /dev/null +++ b/backend/Dockerfile @@ -0,0 +1,9 @@ +# we support images for building with a vanilla SteamOS base, +# or versions with ootb support for rust or go +# developers can also customize these images via this Dockerfile +#FROM ghcr.io/steamdeckhomebrew/holo-toolchain-rust:latest +#FROM ghcr.io/steamdeckhomebrew/holo-toolchain-go:latest +FROM ghcr.io/steamdeckhomebrew/holo-base:latest + +# entrypoint.sh should always be located in the backend folder +ENTRYPOINT [ "/backend/entrypoint.sh" ] \ No newline at end of file diff --git a/backend/Makefile b/backend/Makefile new file mode 100644 index 0000000..a1e5dc5 --- /dev/null +++ b/backend/Makefile @@ -0,0 +1,14 @@ +# This is the default target, which will be built when +# you invoke make +.PHONY: all +all: hello + +# This rule tells make how to build hello from hello.cpp +hello: + mkdir -p ./out + gcc -o ./out/hello ./src/main.c + +# This rule tells make to delete hello and hello.o +.PHONY: clean +clean: + rm -f hello \ No newline at end of file diff --git a/backend-rs/build.sh b/backend/build.sh similarity index 100% rename from backend-rs/build.sh rename to backend/build.sh diff --git a/backend/entrypoint.sh b/backend/entrypoint.sh new file mode 100755 index 0000000..af04d23 --- /dev/null +++ b/backend/entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +echo "Container's IP address: `awk 'END{print $1}' /etc/hosts`" + +cd /backend + +make \ No newline at end of file diff --git a/backend-rs/src/api.rs b/backend/src/api.rs similarity index 100% rename from backend-rs/src/api.rs rename to backend/src/api.rs diff --git a/backend-rs/src/control.rs b/backend/src/control.rs similarity index 100% rename from backend-rs/src/control.rs rename to backend/src/control.rs diff --git a/backend-rs/src/datastructs.rs b/backend/src/datastructs.rs similarity index 100% rename from backend-rs/src/datastructs.rs rename to backend/src/datastructs.rs diff --git a/backend-rs/src/json.rs b/backend/src/json.rs similarity index 100% rename from backend-rs/src/json.rs rename to backend/src/json.rs diff --git a/backend-rs/src/main.rs b/backend/src/main.rs similarity index 100% rename from backend-rs/src/main.rs rename to backend/src/main.rs diff --git a/backend-rs/src/sys.rs b/backend/src/sys.rs similarity index 100% rename from backend-rs/src/sys.rs rename to backend/src/sys.rs