Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ linker = "arm-linux-gnueabihf-gcc"

[target.arm-unknown-linux-musleabihf]
linker = "arm-linux-gnueabihf-gcc"

[target.x86_64-pc-windows-gnu]
linker = "C:\\msys2\\ucrt64\\bin\\gcc.exe"
ar = "C:\\msys2\\ucrt64\\bin\\ar.exe"
55 changes: 21 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

- name: Setup Release
id: setup_release
uses: LizardByte/setup-release-action@v2025.612.120948
uses: LizardByte/actions/actions/release_setup@v2025.715.25226
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -56,7 +56,7 @@ jobs:
# os: ubuntu-latest
# container: alpine:latest
# shell: sh
cargo_env: "source $HOME/.cargo/env"
# cargo_env: "source $HOME/.cargo/env"
- target: aarch64-unknown-linux-gnu # Debian
os: ubuntu-24.04-arm
shell: bash
Expand Down Expand Up @@ -105,18 +105,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
./target
key: ${{ matrix.target }}-${{ github.sha }}
restore-keys: |
${{ matrix.target }}-${{ github.sha }}
${{ matrix.target }}-

- name: Setup cross compiling (Debian)
id: cross_compile
if: contains(matrix.os, 'ubuntu') && matrix.container == null
Expand Down Expand Up @@ -268,7 +256,6 @@ jobs:
libayatana-appindicator-dev \
musl-dev \
openssl-dev \
rustup \
xdotool-dev \
pango-dev \
harfbuzz-dev \
Expand All @@ -279,29 +266,29 @@ jobs:
gettext-dev
echo "::endgroup::"

echo "::group::rustup"
rustup-init -y
echo "::endgroup::"

- name: Install cargo dependencies
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1.13.0
with:
target: ${{ matrix.target }}
components: 'clippy'
cache: true
cache-on-failure: false

# TODO: it may be possible to use cargo-bin in the future to install cargo dependencies,
# but right now it doesn't work without a lock file
# https://github.com/dustinblackman/cargo-run-bin/issues/27
# cargo install cargo-run-bin
# cargo-bin --install
- name: Install cargo packages
run: |
# cargo-bin --install doesn't work without a lock file
# https://github.com/dustinblackman/cargo-run-bin/issues/27
# cargo install cargo-run-bin
# cargo-bin --install

cargo install cargo-edit
cargo install cargo-tarpaulin
cargo install \
cargo-edit \
cargo-tarpaulin

- name: Update Version
if: ${{ needs.setup_release.outputs.publish_release == 'true' }}
run: cargo set-version ${{ needs.setup_release.outputs.release_version }}

- name: Install toolchain
run: |
${{ matrix.cargo_env }}
rustup target add ${{ matrix.target }}

- name: Test
id: test
run: |
Expand Down Expand Up @@ -370,9 +357,9 @@ jobs:
path: artifacts

- name: Create/Update GitHub Release
if: false
if: false # TODO: move release to separate job
# if: ${{ needs.setup_release.outputs.publish_release == 'true' }}
uses: LizardByte/create-release-action@v2025.612.13419
uses: LizardByte/actions/actions/release_create@v2025.715.25226
with:
allowUpdates: true
body: ${{ needs.setup_release.outputs.release_body }}
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,9 @@ Cargo.lock
# coverage results
cobertura.xml
tarpaulin-report.json

# temporary files
build_rs_cov.profraw

# unit tests
test_data/
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ build:
jobs:
build:
html:
- cargo doc --no-deps --verbose --color always
- cargo doc --no-deps --workspace --verbose --color always
- mkdir -p ${READTHEDOCS_OUTPUT}html
- cp -r target/doc/. ${READTHEDOCS_OUTPUT}html/
# redirect index.html to html/koko/index.html
Expand Down
1 change: 1 addition & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ normalize_doc_attributes = true
reorder_impl_items = true
single_line_if_else_max_width = 100
single_line_let_else_max_width = 100
style_edition = "2021"
wrap_comments = true
66 changes: 18 additions & 48 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
[package]
name = "koko"
description = "Self-hosted media server."
license = "AGPL-3.0-only"
version = "0.0.0"
[workspace]
members = [
"crates/server",
# "crates/common",
# "crates/clients-*",
]
resolver = "2"

# Workspace-wide metadata
[workspace.package]
authors = ["LizardByte"]
edition = "2021"
readme = "docs/README.md"
documentation = "https://github.com/LizardByte/Koko/blob/master/README.md"
homepage = "https://app.lizardbyte.dev"
repository = "https://github.com/LizardByte/Koko.git"
license = ""
version = "0.0.0"
categories = [
"multimedia",
"multimedia::audio",
Expand All @@ -21,48 +28,11 @@ keywords = [
"self-hosted",
]
publish = false # disable publishing to crates.io
build = "build.rs"

include = [
"/assets",
"/src",
"/tests",
"/README.md",
"/LICENSE",
]

[lib]
name = "koko"
path = "src/lib.rs"

[[bin]]
name = "koko"
path = "src/main.rs"

[dependencies]
# workspace-level dependencies to ensure consistent versions
[workspace.dependencies]
# ensure deps are compatible: https://www.gnu.org/licenses/license-list.en.html#GPLCompatibleLicenses
cargo_metadata = "0.19.1"
chrono = "0.4.39"
fern = { version = "0.7.1", features = ["colored"] }
image = "0.25.5"
log = "0.4.25"
regex = "1.11.1"
rocket = "0.5.1"
rocket_okapi = { version = "0.9.0", features = ["swagger", "rapidoc"] }
schemars = "0.8.1"
serde = "1.0.217"
tao = "0.31.1"
tray-icon = "0.19.2"
webbrowser = "1.0.3"

[target.'cfg(target_os = "macos")'.dependencies]
objc2-core-foundation = "0.3.0"

[dev-dependencies]

[package.metadata.ci]
cargo-run-bin = "1.7.4"

[package.metadata.bin]
cargo-edit = { version = "0.13.1" }
cargo-tarpaulin = { version = "0.31.5" }
async-std = { version = "1.13.0", features = ["attributes", "tokio1"] }
rstest = "0.25.0"
serial_test = "3.2.0"
tokio = "1.43.0"
Loading
Loading