diff --git a/.github/workflows/server-audit.yml b/.github/workflows/audit.yml similarity index 90% rename from .github/workflows/server-audit.yml rename to .github/workflows/audit.yml index a3b3eac..f15b659 100644 --- a/.github/workflows/server-audit.yml +++ b/.github/workflows/audit.yml @@ -1,4 +1,4 @@ -name: Server Audit +name: Audit on: push: @@ -7,7 +7,7 @@ on: branches: [ main ] jobs: - server_security_audit: + security_audit: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/server-build.yml b/.github/workflows/build.yml similarity index 87% rename from .github/workflows/server-build.yml rename to .github/workflows/build.yml index f2ac753..896d330 100644 --- a/.github/workflows/server-build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Server Build +name: Build on: push: @@ -7,7 +7,7 @@ on: branches: [ main ] jobs: - server_build: + build: runs-on: ${{ matrix.os }} strategy: @@ -35,6 +35,12 @@ jobs: toolchain: ${{ matrix.rust }} override: true + - name: build client (default feature) + uses: actions-rs/cargo@v1 + with: + command: build + args: --all-targets --manifest-path client/Cargo.toml + - name: build server (default feature) uses: actions-rs/cargo@v1 with: diff --git a/.github/workflows/server-clippy.yml b/.github/workflows/clippy.yml similarity index 87% rename from .github/workflows/server-clippy.yml rename to .github/workflows/clippy.yml index 822b9b1..7ac47b9 100644 --- a/.github/workflows/server-clippy.yml +++ b/.github/workflows/clippy.yml @@ -1,4 +1,4 @@ -name: Server Clippy +name: Clippy on: push: @@ -7,7 +7,7 @@ on: branches: [ main ] jobs: - server_clippy: + clippy: runs-on: ubuntu-latest strategy: @@ -35,6 +35,12 @@ jobs: override: true components: clippy + - name: clippy client (default feature) + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --all-targets --manifest-path client/Cargo.toml -- -D warnings + - name: clippy server (default feature) uses: actions-rs/cargo@v1 with: diff --git a/.github/workflows/server-coverage.yml b/.github/workflows/coverage.yml similarity index 91% rename from .github/workflows/server-coverage.yml rename to .github/workflows/coverage.yml index 89737ae..1c73821 100644 --- a/.github/workflows/server-coverage.yml +++ b/.github/workflows/coverage.yml @@ -1,4 +1,4 @@ -name: Server Coverage +name: Coverage on: push: @@ -7,7 +7,7 @@ on: branches: [ main ] jobs: - server_coverage: + coverage: runs-on: ubuntu-latest steps: @@ -23,7 +23,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: --all-features --no-fail-fast --manifest-path server/Cargo.toml + args: --all-features --no-fail-fast --manifest-path Cargo.toml env: CARGO_INCREMENTAL: '0' RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' diff --git a/.github/workflows/server-fmt.yml b/.github/workflows/fmt.yml similarity index 94% rename from .github/workflows/server-fmt.yml rename to .github/workflows/fmt.yml index 29c4723..1e56161 100644 --- a/.github/workflows/server-fmt.yml +++ b/.github/workflows/fmt.yml @@ -1,4 +1,4 @@ -name: Server Fmt +name: Fmt on: push: @@ -7,7 +7,7 @@ on: branches: [ main ] jobs: - server_fmt: + fmt: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/server-test.yml b/.github/workflows/test.yml similarity index 88% rename from .github/workflows/server-test.yml rename to .github/workflows/test.yml index 269aad1..2224d12 100644 --- a/.github/workflows/server-test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Server Test +name: Test on: push: @@ -7,7 +7,7 @@ on: branches: [ main ] jobs: - server_test: + test: runs-on: ${{ matrix.os }} strategy: @@ -37,6 +37,12 @@ jobs: toolchain: ${{ matrix.rust }} override: true + - name: test client (default feature) + uses: actions-rs/cargo@v1 + with: + command: test + args: --manifest-path client/Cargo.toml + - name: test server (default feature) uses: actions-rs/cargo@v1 with: diff --git a/Cargo.toml b/Cargo.toml index 0c74a7e..8132781 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,2 +1,2 @@ [workspace] -members = ["server", "server/server-core", "server/server-macro"] +members = ["server", "server/server-core", "server/server-macro", "client"] diff --git a/client/.clang-format b/client/.clang-format deleted file mode 100644 index a02bad1..0000000 --- a/client/.clang-format +++ /dev/null @@ -1,93 +0,0 @@ ---- -Language: Cpp -# BasedOnStyle: Google -AccessModifierOffset: -3 -AlignAfterOpenBracket: Align -AlignConsecutiveAssignments: false -AlignConsecutiveDeclarations: false -AlignEscapedNewlinesLeft: true -AlignOperands: true -AlignTrailingComments: true -AllowAllParametersOfDeclarationOnNextLine: true -AllowShortBlocksOnASingleLine: false -AllowShortCaseLabelsOnASingleLine: false -AllowShortFunctionsOnASingleLine: false -AllowShortIfStatementsOnASingleLine: false -AllowShortLoopsOnASingleLine: false -AlwaysBreakAfterDefinitionReturnType: None -AlwaysBreakAfterReturnType: None -AlwaysBreakBeforeMultilineStrings: true -AlwaysBreakTemplateDeclarations: true -BinPackArguments: true -BinPackParameters: true -BreakBeforeBraces: Custom -BraceWrapping: - AfterClass: true - AfterControlStatement: true - AfterEnum: true - AfterFunction: true - AfterNamespace: true - AfterObjCDeclaration: true - AfterStruct: true - AfterUnion: true - BeforeCatch: true - BeforeElse: true - IndentBraces: false -BreakBeforeBinaryOperators: None -BreakBeforeTernaryOperators: true -BreakConstructorInitializersBeforeComma: false -BreakAfterJavaFieldAnnotations: false -BreakStringLiterals: true -ColumnLimit: 80 -CommentPragmas: '^ IWYU pragma:' -ConstructorInitializerAllOnOneLineOrOnePerLine: true -ConstructorInitializerIndentWidth: 4 -ContinuationIndentWidth: 4 -Cpp11BracedListStyle: false -DerivePointerAlignment: true -DisableFormat: false -ExperimentalAutoDetectBinPacking: false -ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] -IncludeCategories: - - Regex: '^<.*\.h>' - Priority: 1 - - Regex: '^<.*' - Priority: 2 - - Regex: '.*' - Priority: 3 -IncludeIsMainRegex: '([-_](test|unittest))?$' -IndentCaseLabels: true -IndentWidth: 4 -IndentWrappedFunctionNames: false -JavaScriptQuotes: Leave -JavaScriptWrapImports: true -KeepEmptyLinesAtTheStartOfBlocks: false -MacroBlockBegin: '' -MacroBlockEnd: '' -MaxEmptyLinesToKeep: 1 -NamespaceIndentation: None -ObjCBlockIndentWidth: 2 -ObjCSpaceAfterProperty: false -ObjCSpaceBeforeProtocolList: false -PenaltyBreakBeforeFirstCallParameter: 1 -PenaltyBreakComment: 300 -PenaltyBreakFirstLessLess: 120 -PenaltyBreakString: 1000 -PenaltyExcessCharacter: 1000000 -PenaltyReturnTypeOnItsOwnLine: 200 -PointerAlignment: Left -ReflowComments: true -SortIncludes: true -SpaceAfterCStyleCast: false -SpaceBeforeAssignmentOperators: true -SpaceBeforeParens: ControlStatements -SpaceInEmptyParentheses: false -SpacesBeforeTrailingComments: 2 -SpacesInAngles: false -SpacesInContainerLiterals: true -SpacesInCStyleCastParentheses: false -SpacesInParentheses: false -SpacesInSquareBrackets: false -Standard: Auto -TabWidth: 4 -UseTab: Never \ No newline at end of file diff --git a/client/Cargo.toml b/client/Cargo.toml new file mode 100644 index 0000000..729587b --- /dev/null +++ b/client/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "client" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/client/Includes/Server.hpp b/client/Includes/Server.hpp deleted file mode 100644 index c15e2f4..0000000 --- a/client/Includes/Server.hpp +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef CUBBY_CONNECT_CLIENT_SERVER_HPP -#define CUBBY_CONNECT_CLIENT_SERVER_HPP - -int Add(int a, int b); - -#endif \ No newline at end of file diff --git a/client/Sources/Server.cpp b/client/Sources/Server.cpp deleted file mode 100644 index 8877032..0000000 --- a/client/Sources/Server.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int Add(int a, int b) -{ - return a + b; -} \ No newline at end of file diff --git a/client/Tests/SimpleTest.cpp b/client/Tests/SimpleTest.cpp deleted file mode 100644 index 9854713..0000000 --- a/client/Tests/SimpleTest.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN -#include "doctest.h" - -#include - -TEST_CASE("Simple test") -{ - CHECK(Add(2, 3) == 5); -} \ No newline at end of file diff --git a/client/src/lib.rs b/client/src/lib.rs new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/client/src/lib.rs @@ -0,0 +1 @@ +