Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2b21eb8
Update dependencies and GTK version
AndresCdo Jul 31, 2024
665eb19
chore: Update .gitignore to ignore build artifacts, IDE/editor-specif…
AndresCdo Jul 31, 2024
e3d9f32
chore: Update gtk-ui.glade to improve UI layout and functionality
AndresCdo Jul 31, 2024
59f2dc1
chore: Update sourceview dependency to fix compatibility issues
AndresCdo Jul 31, 2024
ce64256
chore: Update preview struct
AndresCdo Jul 31, 2024
57f2308
Update main.rs
AndresCdo Jul 31, 2024
2c36ede
chore: Creates CSS files
AndresCdo Jul 31, 2024
a8ba676
Refactor main.rs
AndresCdo Aug 1, 2024
d17e247
Refactor utils.rs
AndresCdo Aug 1, 2024
11bebbc
Updates README
AndresCdo Aug 1, 2024
d54618c
Create rust.yml
AndresCdo Aug 1, 2024
85f62a3
Update rust.yml
AndresCdo Aug 1, 2024
e10d4d9
Merge pull request #1 from AndresCdo/dev
AndresCdo Aug 1, 2024
324d132
Update README.md
AndresCdo Aug 1, 2024
100c87c
chore: update Rust edition and GTK/GIO dependencies
AndresCdo Oct 19, 2025
5501c5d
refactor: use programmatic GTK UI, drop SourceView
AndresCdo Oct 19, 2025
612f2d8
chore(ci): enhance Rust CI pipeline
AndresCdo Oct 19, 2025
3853ea4
style: tidy imports and formatting
AndresCdo Oct 19, 2025
302d5b0
refactor: Replaces PathBuf with Path in utils
AndresCdo Oct 19, 2025
ba3c358
chore: Allows beta Rust job to fail in CI
AndresCdo Oct 19, 2025
c28c302
chore: Updates deps and regenerates lockfile
AndresCdo Oct 23, 2025
754ab10
Merge pull request #2 from AndresCdo/fix/issue-11
AndresCdo Oct 23, 2025
71e46db
fix: adds Quit label to File menu
AndresCdo Oct 23, 2025
73d53b6
docs(rust.yml): removes outdated issue link from comments
AndresCdo Oct 23, 2025
39e1885
Merge pull request #3 from AndresCdo/dev
AndresCdo Oct 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
207 changes: 207 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
name: Rust CI/CD

# Build status: Known issue with glib 0.18.5 trait bounds on some Rust versions.

# Workaround: Beta channel is allowed to fail. Stable must pass.

on:
push:
branches: [ "master", "dev" ]
paths:
- 'src/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/rust.yml'
pull_request:
branches: [ "master", "dev" ]
paths:
- 'src/**'
- 'Cargo.toml'
- 'Cargo.lock'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: 1

jobs:
lint:
name: Lint (Clippy)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy

- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-

- name: Cache cargo index
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-git-

- name: Cache cargo build
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-target-

- name: Install system dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
libpango1.0-dev \
libcairo2-dev \
libatk1.0-dev \
libgdk-pixbuf2.0-dev \
libgtk-3-dev \
libsoup2.4-dev \
libjavascriptcoregtk-4.1-dev \
libwebkit2gtk-4.1-dev

- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings

build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
rust: [ stable, beta ]
fail-fast: false
continue-on-error: ${{ matrix.rust == 'beta' }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}

- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-

- name: Cache cargo index
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-git-

- name: Cache cargo build
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-target-${{ matrix.rust }}-

- name: Install system dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
libpango1.0-dev \
libcairo2-dev \
libatk1.0-dev \
libgdk-pixbuf2.0-dev \
libgtk-3-dev \
libsoup2.4-dev \
libjavascriptcoregtk-4.1-dev \
libwebkit2gtk-4.1-dev

- name: Build (debug)
run: cargo build --verbose

- name: Build (release)
run: cargo build --release --verbose

test:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-

- name: Cache cargo index
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-git-

- name: Cache cargo build
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-target-

- name: Install system dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
libpango1.0-dev \
libcairo2-dev \
libatk1.0-dev \
libgdk-pixbuf2.0-dev \
libgtk-3-dev \
libsoup2.4-dev \
libjavascriptcoregtk-4.1-dev \
libwebkit2gtk-4.1-dev

- name: Run tests
run: cargo test --verbose

format:
name: Code Format
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt

- name: Check code formatting
run: cargo fmt --all -- --check
52 changes: 50 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,53 @@

# Ignore the target directory
/target/
**/*.rs.bk

# Ignore backup files
**/*.rs.bk
*.glade~

# Ignore build artifacts
**/*.d
**/*.o
**/*.so
**/*.a
**/*.lib

# Ignore Cargo-specific files
/.cargo
/.rustup
Cargo.lock

# Ignore IDE/editor-specific files
/.idea/
/.vscode/
/*.code-workspace

# Ignore OS-specific files
.DS_Store
Thumbs.db

# Ignore temporary files
*.tmp
*.swp
*.swo
*.bak
*.old

# Ignore log files
*.log

# Ignore coverage files
coverage/
*.lcov

# Ignore binary files
*.exe
*.dll
*.dylib
*.bin

# Ignore Rust documentation
/target/doc/

# Ignore Rust build scripts output
/target/debug/
Loading