Skip to content

Commit

Permalink
getting started, feels very doable
Browse files Browse the repository at this point in the history
[x] proof of concept, pure rust and only pulling images for now
[x] using kanal for message passing
[x] async page pull
[x] small cli with arguments
[x] reuse the same client over time, and the same connection pool across the threads
[x] image crop and resize
[ ] pull all the payloads
[ ] image encoding
[ ] bulletproof all paths
[ ] unit tests
[x] CI
[ ] CD
  • Loading branch information
blefaudeux committed Jan 30, 2025
1 parent a46e601 commit ee80e85
Show file tree
Hide file tree
Showing 12 changed files with 3,467 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Rust CI

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
rust: [stable]

steps:
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy

- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Check formatting
run: cd rust/datago && cargo fmt --all -- --check

- name: Clippy
run: cd rust/datago && cargo clippy -- -D warnings

- name: Build
run: cd rust/datago && cargo build --verbose

- name: Run tests
run: cd rust/datago && cargo test --verbose
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ build

__pycache__
*.pyc

target/debug
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ repos:
rev: v0.5.1
hooks:
- id: go-fmt
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt
- id: clippy
1 change: 1 addition & 0 deletions rust/datago/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target
Loading

0 comments on commit ee80e85

Please sign in to comment.