Compare commits

...

25 commits

Author SHA1 Message Date
Ahmet Kaan GÜMÜŞ
db3d864de0
Merge pull request #29 from Tahinli/dev
build: 👷 updated to versatile build script
2024-09-25 21:44:54 +00:00
Ahmet Kaan GÜMÜŞ
93a5e9b5ca build: 👷 updated to versatile build script 2024-09-25 23:27:53 +03:00
Ahmet Kaan GÜMÜŞ
df91279e6e
Merge pull request #28 from Tahinli/dev
docs: 📝 upload assets to repo itself and update links
2024-09-11 15:34:36 +00:00
Ahmet Kaan GÜMÜŞ
8716833ac4 docs: 📝 upload assets to repo itself and update links 2024-09-11 18:33:41 +03:00
Ahmet Kaan GÜMÜŞ
4b0423bc68
Merge pull request #27 from Tahinli/dev
Dev
2024-09-08 03:55:38 +03:00
Ahmet Kaan GÜMÜŞ
96cfc0ad9b docs: 📝 new example image added to readme 2024-09-08 03:54:46 +03:00
Ahmet Kaan GÜMÜŞ
346f297f12 docs: 📝 update readme 2024-09-08 03:45:05 +03:00
Ahmet Kaan GÜMÜŞ
8861f81f06
Merge pull request #26 from Tahinli/dev
Dev
2024-08-10 16:13:57 +00:00
Ahmet Kaan GÜMÜŞ
f20fbe83b6 build: 👷 update release action to v2 2024-08-10 19:12:09 +03:00
Ahmet Kaan GÜMÜŞ
99ba75f6b1 build: 👷 update download artifact action to v4 2024-08-10 19:09:59 +03:00
Ahmet Kaan GÜMÜŞ
569c5ea566 build: 👷 update upload artifact action to v4 2024-08-10 19:09:28 +03:00
Ahmet Kaan GÜMÜŞ
264367572a build: 👷 update checkout action to v4 2024-08-10 19:05:49 +03:00
Ahmet Kaan GÜMÜŞ
74b7646d64
Merge pull request #14 from Tahinli/dev
Dev
2024-03-16 00:01:23 +00:00
Ahmet Kaan GÜMÜŞ
190655c44f build: 👷 name of process and folders 2024-03-16 02:59:48 +03:00
Ahmet Kaan GÜMÜŞ
3344c18ef2 chore: 🙈 .vscode 2024-03-04 01:28:44 +03:00
Ahmet Kaan GÜMÜŞ
9360f06917 refactor: ♻️ file type restrictions 2024-03-03 03:24:15 +03:00
Ahmet Kaan GÜMÜŞ
f08d277267 fix: 🔒 receive until is replaced by exacts 2024-03-03 01:42:39 +03:00
Ahmet Kaan GÜMÜŞ
1c14a81e18 refactor: clippy 2024-03-02 18:31:41 +03:00
Ahmet Kaan GÜMÜŞ
a3ccc63d37 style: fmt 2024-03-02 17:56:38 +03:00
Ahmet Kaan GÜMÜŞ
631c41b171 build: panic = "abort" 2024-01-03 14:30:12 +03:00
Ahmet Kaan GÜMÜŞ
6e2fb6eae7 build: codegen-units = 1 2024-01-03 14:22:14 +03:00
Tahinli
629caef9e9 Revert "refactor: forbid unsafe"
This reverts commit a48f8760e4.
2023-11-20 16:53:42 +03:00
Tahinli
a48f8760e4 refactor: forbid unsafe 2023-11-20 16:52:10 +03:00
Ahmet Kaan GÜMÜŞ
3ee173f8f3
refactor: forbid unsafe 2023-11-20 13:37:31 +00:00
Ahmet Kaan GÜMÜŞ
b4ab4e2f18
doc: add how to examples in readme 2023-11-18 17:50:39 +00:00
9 changed files with 805 additions and 858 deletions

View file

@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Build - name: Build
run: cargo build --release --verbose run: cargo build --release --verbose
- name: Run tests - name: Run tests

View file

@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Build - name: Build
run: cargo build --release --verbose run: cargo build --release --verbose
- name: Run tests - name: Run tests
@ -25,7 +25,7 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Build - name: Build
run: cargo build --release --verbose run: cargo build --release --verbose
- name: Run tests - name: Run tests
@ -37,7 +37,7 @@ jobs:
runs-on: macos-latest runs-on: macos-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Build - name: Build
run: cargo build --release --verbose run: cargo build --release --verbose
- name: Run tests - name: Run tests

View file

@ -2,62 +2,60 @@ name: Rust -> Build & Test & Release
on: on:
push: push:
branches: [ "main" ] branches: ["main"]
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
PROJECT_NAME: ${{ github.event.repository.name }}
jobs: jobs:
build_linux: build_linux:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Build - name: Build
run: cargo build --release --verbose run: cargo build --release --verbose
- name: Run tests - name: Run tests
run: cargo test --verbose run: cargo test --verbose
- name: Upload Linux Binary - name: Upload Linux Binary
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: rust_tcp_file_transfer_linux_x64_86 name: ${{ env.PROJECT_NAME }}-linux-x64_86
path: target/release/*transfer path: target/release/${{ env.PROJECT_NAME }}
build_windows: build_windows:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Build - name: Build
run: cargo build --release --verbose run: cargo build --release --verbose
- name: Run tests - name: Run tests
run: cargo test --verbose run: cargo test --verbose
- name: Upload Windows Binary - name: Upload Windows Binary
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: rust_tcp_file_transfer_windows_x64_86 name: ${{ env.PROJECT_NAME }}-windows-x64_86
path: target/release/*transfer.exe path: target/release/${{ env.PROJECT_NAME }}.exe
build_macos: build_macos:
runs-on: macos-latest runs-on: macos-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Build - name: Build
run: cargo build --release --verbose run: cargo build --release --verbose
- name: Run tests - name: Run tests
run: cargo test --verbose run: cargo test --verbose
- name: Upload MacOS Binary - name: Upload MacOS Binary
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: rust_tcp_file_transfer_macos_x64_86 name: ${{ env.PROJECT_NAME }}-macos-arm64
path: target/release/*transfer path: target/release/${{ env.PROJECT_NAME }}
release: release:
needs: [build_linux, build_windows, build_macos] needs: [build_linux, build_windows, build_macos]
@ -65,36 +63,34 @@ jobs:
permissions: permissions:
contents: write contents: write
steps: steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- name: Forge a Folder - name: Forge a Folder
run: mkdir Downloads run: mkdir Downloads
working-directory: /home/runner/work/rust-tcp-file-transfer/rust-tcp-file-transfer/ working-directory: /home/runner/work/${{ env.PROJECT_NAME }}/${{ env.PROJECT_NAME }}/
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v4
name: Download name: Download
with: with:
path: Downloads/ path: Downloads/
- name: Rename Binaries - name: Rename Binaries
run: | run: |
mv Downloads/rust_tcp_file_transfer_linux_x64_86/rust-tcp-file-transfer Downloads/rust_tcp_file_transfer_linux_x64_86/rust-tcp-file-transfer-linux_x64_86 tree Downloads/
mv Downloads/rust_tcp_file_transfer_windows_x64_86/rust-tcp-file-transfer.exe Downloads/rust_tcp_file_transfer_windows_x64_86/rust-tcp-file-transfer-windows_x64_86.exe mv Downloads/${{ env.PROJECT_NAME }}-linux-x64_86/${{ env.PROJECT_NAME }} Downloads/${{ env.PROJECT_NAME }}-linux-x64_86/${{ env.PROJECT_NAME }}-linux-x64_86
mv Downloads/rust_tcp_file_transfer_macos_x64_86/rust-tcp-file-transfer Downloads/rust_tcp_file_transfer_macos_x64_86/rust-tcp-file-transfer-macos_x64_86 mv Downloads/${{ env.PROJECT_NAME }}-windows-x64_86/${{ env.PROJECT_NAME }}.exe Downloads/${{ env.PROJECT_NAME }}-windows-x64_86/${{ env.PROJECT_NAME }}-windows-x64_86.exe
mv Downloads/${{ env.PROJECT_NAME }}-macos-arm64/${{ env.PROJECT_NAME }} Downloads/${{ env.PROJECT_NAME }}-macos-arm64/${{ env.PROJECT_NAME }}-macos-arm64
- name: Git Commit SHA - name: Git Commit SHA
id: vars id: vars
run: | run: |
calculatedSha=$(git rev-parse --short ${{ github.sha }}) calculatedSha=$(git rev-parse --short ${{ github.sha }})
echo "short_sha=$calculatedSha" >> $GITHUB_OUTPUT echo "short_sha=$calculatedSha" >> $GITHUB_OUTPUT
- uses: softprops/action-gh-release@v0.1.15 - uses: softprops/action-gh-release@v2
name: Release name: Release
with: with:
tag_name: ${{ steps.vars.outputs.short_sha }} tag_name: ${{ steps.vars.outputs.short_sha }}
generate_release_notes: true generate_release_notes: true
files: | files: |
Downloads/*linux*/*transfer* Downloads/*linux*/${{ env.PROJECT_NAME }}*
Downloads/*windows*/*transfer* Downloads/*windows*/${{ env.PROJECT_NAME }}*
Downloads/*macos*/*transfer* Downloads/*macos*/${{ env.PROJECT_NAME }}*

1
.gitignore vendored
View file

@ -2,6 +2,7 @@
# will have compiled files and executables # will have compiled files and executables
debug/ debug/
target/ target/
.vscode/
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html

View file

@ -8,6 +8,10 @@ strip = "symbols"
opt-level = 3 opt-level = 3
overflow-checks = true overflow-checks = true
lto = true lto = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html codegen-units = 1
panic = "abort"
[lints.rust]
unsafe_code = "forbid"
[dependencies] [dependencies]

View file

@ -2,16 +2,25 @@
# rust-tcp-file-transfer # rust-tcp-file-transfer
TCP File Transfer Server and Client in Rust TCP File Transfer Server and Client in Rust
**Usage**
> ./rust-tcp-file-transfer -h
>
<img src=assets/help_menu.png>
**Examples**
> ./rust-tcp-file-transfer -sv -s -l ~/Desktop/cat.png
>
> ./rust-tcp-file-transfer -cl -r -l ~/Documents/
<img src=assets/example.png>
**TO-DO List**
☑ Standard library only.
☑ File transfer over network. ☑ File transfer over network.
☑ Remove memory limitations. [d42412c](https://github.com/Tahinli/rust-tcp-file-transfer/pull/1/commits/d42412c57d7d95672ba64b3e489b95f1c4b04a08) ☑ Remove memory limitations. [d42412c](https://github.com/Tahinli/rust-tcp-file-transfer/pull/1/commits/d42412c57d7d95672ba64b3e489b95f1c4b04a08)
☑ Bidirectional transfer. [b0531de](https://github.com/Tahinli/rust-tcp-file-transfer/commit/b0531deb257332f46fc76de16d3a17fb3b28acee) ☑ Bidirectional transfer. [b0531de](https://github.com/Tahinli/rust-tcp-file-transfer/commit/b0531deb257332f46fc76de16d3a17fb3b28acee)
☐ Folder transfer.
☐ Remember where it stopped.
☐ Reach over NAT (peer to peer).
☐ Async.

BIN
assets/example.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 KiB

BIN
assets/help_menu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

File diff suppressed because it is too large Load diff