From ed9bb18ed21bbbf66771d0ef3efed9f4e94c81ec Mon Sep 17 00:00:00 2001 From: litinoveweedle <15144712+litinoveweedle@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:56:20 +0100 Subject: [PATCH 01/26] Create build.yml --- .github/workflows/build.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..1de662a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,34 @@ +jobs: + release: + name: Release - ${{ matrix.platform.os-name }} + strategy: + matrix: + platform: + - os-name: Linux-x86_64 + runs-on: ubuntu-20.04 + target: x86_64-unknown-linux-musl + - os-name: Linux-arm + runs-on: ubuntu-20.04 + target: arm-unknown-linux-musleabi + - os-name: Linux-i686 + runs-on: ubuntu-20.04 + target: i686-unknown-linux-musl + - os-name: Linux-aarch64 + runs-on: ubuntu-20.04 + target: aarch64-unknown-linux-musl + runs-on: ${{ matrix.platform.runs-on }} + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Build binary + uses: houseabsolute/actions-rust-cross@v0 + with: + command: ${{ matrix.platform.command }} + target: ${{ matrix.platform.target }} + args: "--locked --release" + strip: true + - name: Publish artifacts and release + uses: houseabsolute/actions-rust-release@v0 + with: + executable-name: taptap + target: ${{ matrix.platform.target }} From 8ea59905dfc898ad5c7c80a5695777ce5ecb4566 Mon Sep 17 00:00:00 2001 From: litinoveweedle <15144712+litinoveweedle@users.noreply.github.com> Date: Tue, 19 Nov 2024 16:14:30 +0100 Subject: [PATCH 02/26] Update build.yml --- .github/workflows/build.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1de662a..3b08e61 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,7 +1,19 @@ +name: "Build" + +on: + push: + branches: + - "main" + tags-ignore: + - "**" + pull_request: + workflow_dispatch: + jobs: release: name: Release - ${{ matrix.platform.os-name }} strategy: + fail-fast: false matrix: platform: - os-name: Linux-x86_64 From 84bf12979153f1845a1e5c2bce28aa7f30137e11 Mon Sep 17 00:00:00 2001 From: litinoveweedle <15144712+litinoveweedle@users.noreply.github.com> Date: Tue, 19 Nov 2024 16:23:14 +0100 Subject: [PATCH 03/26] Create Changes.md --- Changes.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 Changes.md diff --git a/Changes.md b/Changes.md new file mode 100644 index 0000000..0bacec7 --- /dev/null +++ b/Changes.md @@ -0,0 +1 @@ +Initial build for 0.1.1 From 18a24b3d19f30847925d3e0640ce53ee8621918d Mon Sep 17 00:00:00 2001 From: litinoveweedle <15144712+litinoveweedle@users.noreply.github.com> Date: Tue, 19 Nov 2024 16:46:25 +0100 Subject: [PATCH 04/26] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b08e61..bf41b75 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ on: - "**" pull_request: workflow_dispatch: - + release: jobs: release: name: Release - ${{ matrix.platform.os-name }} From ae6514cf1c0b27295972bea602bf7a87468991a6 Mon Sep 17 00:00:00 2001 From: litinoveweedle <15144712+litinoveweedle@users.noreply.github.com> Date: Tue, 19 Nov 2024 17:00:37 +0100 Subject: [PATCH 05/26] Update build.yml --- .github/workflows/build.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bf41b75..0f1126a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,11 +4,9 @@ on: push: branches: - "main" - tags-ignore: - - "**" - pull_request: + tags: + - 'v*' workflow_dispatch: - release: jobs: release: name: Release - ${{ matrix.platform.os-name }} From 8fb614a6d8b64f474431dceb3b56d5a379e09300 Mon Sep 17 00:00:00 2001 From: litinoveweedle <15144712+litinoveweedle@users.noreply.github.com> Date: Thu, 6 Mar 2025 23:32:19 +0100 Subject: [PATCH 06/26] Update build.yml rust-cross action --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0f1126a..e02abac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Build binary - uses: houseabsolute/actions-rust-cross@v0 + uses: houseabsolute/actions-rust-cross@v1 with: command: ${{ matrix.platform.command }} target: ${{ matrix.platform.target }} From 5d967ee22b2841f1e553cf6a2b35b1893086ab3f Mon Sep 17 00:00:00 2001 From: litinoveweedle <15144712+litinoveweedle@users.noreply.github.com> Date: Thu, 6 Mar 2025 23:35:27 +0100 Subject: [PATCH 07/26] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e02abac..eac3e13 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: runs-on: ${{ matrix.platform.runs-on }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build binary uses: houseabsolute/actions-rust-cross@v1 with: From 73109d53bb1e28e8532574c092da33b94a613c5e Mon Sep 17 00:00:00 2001 From: litinoveweedle <15144712+litinoveweedle@users.noreply.github.com> Date: Thu, 6 Mar 2025 23:41:59 +0100 Subject: [PATCH 08/26] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eac3e13..d13dad2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,7 +33,7 @@ jobs: - name: Build binary uses: houseabsolute/actions-rust-cross@v1 with: - command: ${{ matrix.platform.command }} + command: "build" target: ${{ matrix.platform.target }} args: "--locked --release" strip: true From 265d6827a2029cb2821514529b3b2cc7e92b92fe Mon Sep 17 00:00:00 2001 From: litinoveweedle <15144712+litinoveweedle@users.noreply.github.com> Date: Fri, 7 Mar 2025 00:13:15 +0100 Subject: [PATCH 09/26] Update main.rs --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index f72c394..c433edb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -53,7 +53,7 @@ enum Commands { } #[derive(Args, Debug, Clone)] -#[group(required = true, multiple = false)] +#[group(required = true, multiple = true)] struct Source { /// The name of the serial port (try `taptap list-serial-ports`) #[arg(long, group = "mode", value_name = "SERIAL-PORT")] From a55ca72d750d7f774055b23b7e830c1567f75840 Mon Sep 17 00:00:00 2001 From: litinoveweedle <15144712+litinoveweedle@users.noreply.github.com> Date: Wed, 19 Mar 2025 18:15:06 +0100 Subject: [PATCH 10/26] Update build.yml added arm7 --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d13dad2..3c7c73e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,9 @@ jobs: - os-name: Linux-arm runs-on: ubuntu-20.04 target: arm-unknown-linux-musleabi + - os-name: Linux-arm + runs-on: ubuntu-20.04 + target: armv7-unknown-linux-musleabihf - os-name: Linux-i686 runs-on: ubuntu-20.04 target: i686-unknown-linux-musl From 9bc04a39bffb60a3ef49251f53473d888b667595 Mon Sep 17 00:00:00 2001 From: litinoveweedle <15144712+litinoveweedle@users.noreply.github.com> Date: Wed, 19 Mar 2025 18:18:46 +0100 Subject: [PATCH 11/26] Update build.yml changed arm target to armhf --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3c7c73e..b8618f2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: target: x86_64-unknown-linux-musl - os-name: Linux-arm runs-on: ubuntu-20.04 - target: arm-unknown-linux-musleabi + target: arm-unknown-linux-musleabihf - os-name: Linux-arm runs-on: ubuntu-20.04 target: armv7-unknown-linux-musleabihf From 407e7a27747e4af26e9809cf4bf0a98d6ff3fa6e Mon Sep 17 00:00:00 2001 From: litinoveweedle <15144712+litinoveweedle@users.noreply.github.com> Date: Sun, 1 Jun 2025 17:29:29 +0200 Subject: [PATCH 12/26] add GNU build targets add GNU build targets --- .github/workflows/build.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b8618f2..612190c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,18 +14,33 @@ jobs: fail-fast: false matrix: platform: + - os-name: Linux-x86_64 + runs-on: ubuntu-20.04 + target: x86_64-unknown-linux-gnu - os-name: Linux-x86_64 runs-on: ubuntu-20.04 target: x86_64-unknown-linux-musl + - os-name: Linux-arm + runs-on: ubuntu-20.04 + target: arm-unknown-linux-gnueabihf - os-name: Linux-arm runs-on: ubuntu-20.04 target: arm-unknown-linux-musleabihf + - os-name: Linux-arm + runs-on: ubuntu-20.04 + target: armv7-unknown-linux-gnueabihf - os-name: Linux-arm runs-on: ubuntu-20.04 target: armv7-unknown-linux-musleabihf + - os-name: Linux-i686 + runs-on: ubuntu-20.04 + target: i686-unknown-linux-gnu - os-name: Linux-i686 runs-on: ubuntu-20.04 target: i686-unknown-linux-musl + - os-name: Linux-aarch64 + runs-on: ubuntu-20.04 + target: aarch64-unknown-linux-gnu - os-name: Linux-aarch64 runs-on: ubuntu-20.04 target: aarch64-unknown-linux-musl From f57c2978d1cbf8d2431cc10777cffad08b3d1da2 Mon Sep 17 00:00:00 2001 From: litinoveweedle <15144712+litinoveweedle@users.noreply.github.com> Date: Sun, 1 Jun 2025 17:31:08 +0200 Subject: [PATCH 13/26] update runner to Ubuntu 22.04 --- .github/workflows/build.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 612190c..ee3b500 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,34 +15,34 @@ jobs: matrix: platform: - os-name: Linux-x86_64 - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 target: x86_64-unknown-linux-gnu - os-name: Linux-x86_64 - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 target: x86_64-unknown-linux-musl - os-name: Linux-arm - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 target: arm-unknown-linux-gnueabihf - os-name: Linux-arm - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 target: arm-unknown-linux-musleabihf - os-name: Linux-arm - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 target: armv7-unknown-linux-gnueabihf - os-name: Linux-arm - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 target: armv7-unknown-linux-musleabihf - os-name: Linux-i686 - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 target: i686-unknown-linux-gnu - os-name: Linux-i686 - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 target: i686-unknown-linux-musl - os-name: Linux-aarch64 - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 target: aarch64-unknown-linux-gnu - os-name: Linux-aarch64 - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 target: aarch64-unknown-linux-musl runs-on: ${{ matrix.platform.runs-on }} steps: From 76c3faf2ac32f631574bc4fd9123d65dae49af97 Mon Sep 17 00:00:00 2001 From: litinoveweedle <15144712+litinoveweedle@users.noreply.github.com> Date: Sun, 1 Jun 2025 17:37:54 +0200 Subject: [PATCH 14/26] Update build.yml --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ee3b500..7cd5673 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,6 +48,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y libudev-dev - name: Build binary uses: houseabsolute/actions-rust-cross@v1 with: From c06db7950977b79fb0f8a15e3094ccfe25d0ea50 Mon Sep 17 00:00:00 2001 From: litinoveweedle <15144712+litinoveweedle@users.noreply.github.com> Date: Sun, 1 Jun 2025 18:12:54 +0200 Subject: [PATCH 15/26] Update build.yml --- .github/workflows/build.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7cd5673..a1a1209 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,33 +14,18 @@ jobs: fail-fast: false matrix: platform: - - os-name: Linux-x86_64 - runs-on: ubuntu-22.04 - target: x86_64-unknown-linux-gnu - os-name: Linux-x86_64 runs-on: ubuntu-22.04 target: x86_64-unknown-linux-musl - - os-name: Linux-arm - runs-on: ubuntu-22.04 - target: arm-unknown-linux-gnueabihf - os-name: Linux-arm runs-on: ubuntu-22.04 target: arm-unknown-linux-musleabihf - - os-name: Linux-arm - runs-on: ubuntu-22.04 - target: armv7-unknown-linux-gnueabihf - os-name: Linux-arm runs-on: ubuntu-22.04 target: armv7-unknown-linux-musleabihf - - os-name: Linux-i686 - runs-on: ubuntu-22.04 - target: i686-unknown-linux-gnu - os-name: Linux-i686 runs-on: ubuntu-22.04 target: i686-unknown-linux-musl - - os-name: Linux-aarch64 - runs-on: ubuntu-22.04 - target: aarch64-unknown-linux-gnu - os-name: Linux-aarch64 runs-on: ubuntu-22.04 target: aarch64-unknown-linux-musl From 2585f51610e9de8d43bcf42f4dd9d222cf648296 Mon Sep 17 00:00:00 2001 From: litinoveweedle <15144712+litinoveweedle@users.noreply.github.com> Date: Wed, 22 Oct 2025 22:53:52 +0200 Subject: [PATCH 16/26] Reconnect logic * implemented TCP keep alives * reconnect logic implementation * updated README for new features * read code de-duplication into function --- Cargo.lock | 17 ++- Cargo.toml | 1 + README.md | 28 ++-- src/config.rs | 39 +++++- src/gateway/physical/tcp.rs | 51 ++++++- src/gateway/transport.rs | 2 +- src/main.rs | 256 ++++++++++++++++++++++-------------- 7 files changed, 277 insertions(+), 117 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 77d1006..d779e1f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "adler" @@ -300,9 +300,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.155" +version = "0.2.172" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" [[package]] name = "libudev" @@ -553,6 +553,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys", +] + [[package]] name = "strsim" version = "0.11.1" @@ -584,6 +594,7 @@ dependencies = [ "serde", "serde_json", "serialport", + "socket2", "thiserror", "zerocopy", ] diff --git a/Cargo.toml b/Cargo.toml index 6a5e22a..ad2d4df 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,6 +23,7 @@ libc = "0.2.155" zerocopy = { version = "0.8.0-alpha.16", features = ["derive"] } flate2 = "1.0" log = "0.4.22" +socket2 = { version = "0.5.10", features = ["all"] } # Optional library features serialport = { version = "4.4", optional = true } diff --git a/README.md b/README.md index 35a206d..b1c690a 100644 --- a/README.md +++ b/README.md @@ -105,19 +105,29 @@ etc. It is a fast way to get started for some users, but consider wiring in a se ```console % taptap -Usage: taptap +Usage: taptap