A tiny Subsonic/Jellyfin/S3 server in Rust
navidrome subsonic s3 emby jellyfin
0

Configure Feed

Select the types of activity you want to include in your feed.

Add cross config and GitHub release workflow

Sets up cross-rs for armv6, armv7, and aarch64 Linux targets, pinned to
the 0.2.5 images for reproducibility. Adds .github/workflows/release.yml
that builds smolsonic for macOS (amd64, aarch64) and Linux (amd64,
aarch64, armhf) on tag push, packages each binary with the README,
LICENSE, and example config into a tar.gz with a sha256, and publishes
them to a GitHub release. Forces libsqlite3-sys to vendor SQLite so
cross builds don't try to link against the host libsqlite3.

+139
+118
.github/workflows/release.yml
··· 1 + name: Release 2 + 3 + on: 4 + push: 5 + tags: 6 + - "v*" 7 + workflow_dispatch: 8 + inputs: 9 + tag: 10 + description: "Tag to release (e.g. v0.1.0)" 11 + required: true 12 + type: string 13 + 14 + permissions: 15 + contents: write 16 + 17 + jobs: 18 + build: 19 + name: ${{ matrix.label }} 20 + runs-on: ${{ matrix.os }} 21 + strategy: 22 + fail-fast: false 23 + matrix: 24 + include: 25 + - label: macos-amd64 26 + os: macos-13 27 + target: x86_64-apple-darwin 28 + use_cross: false 29 + - label: macos-aarch64 30 + os: macos-14 31 + target: aarch64-apple-darwin 32 + use_cross: false 33 + - label: linux-amd64 34 + os: ubuntu-latest 35 + target: x86_64-unknown-linux-gnu 36 + use_cross: false 37 + - label: linux-aarch64 38 + os: ubuntu-latest 39 + target: aarch64-unknown-linux-gnu 40 + use_cross: true 41 + - label: linux-armhf 42 + os: ubuntu-latest 43 + target: armv7-unknown-linux-gnueabihf 44 + use_cross: true 45 + 46 + steps: 47 + - name: Checkout 48 + uses: actions/checkout@v4 49 + 50 + - name: Install Rust toolchain 51 + uses: dtolnay/rust-toolchain@stable 52 + with: 53 + targets: ${{ matrix.target }} 54 + 55 + - name: Cache cargo 56 + uses: Swatinem/rust-cache@v2 57 + with: 58 + key: ${{ matrix.target }} 59 + 60 + - name: Install cross 61 + if: matrix.use_cross 62 + run: cargo install cross --locked 63 + 64 + - name: Build (cargo) 65 + if: ${{ !matrix.use_cross }} 66 + run: cargo build --release --locked --target ${{ matrix.target }} 67 + 68 + - name: Build (cross) 69 + if: matrix.use_cross 70 + run: cross build --release --locked --target ${{ matrix.target }} 71 + 72 + - name: Package 73 + shell: bash 74 + run: | 75 + set -euo pipefail 76 + if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then 77 + version="${{ inputs.tag }}" 78 + else 79 + version="${GITHUB_REF_NAME}" 80 + fi 81 + name="smolsonic-${version}-${{ matrix.label }}" 82 + src="target/${{ matrix.target }}/release/smolsonic" 83 + mkdir -p dist/staging 84 + cp "$src" dist/staging/smolsonic 85 + cp README.md LICENSE smolsonic.example.toml dist/staging/ 86 + tar -C dist/staging -czf "dist/${name}.tar.gz" . 87 + (cd dist && shasum -a 256 "${name}.tar.gz" > "${name}.tar.gz.sha256") 88 + ls -lh dist 89 + 90 + - name: Upload artifact 91 + uses: actions/upload-artifact@v4 92 + with: 93 + name: ${{ matrix.label }} 94 + path: dist/*.tar.gz* 95 + if-no-files-found: error 96 + 97 + release: 98 + name: Publish GitHub release 99 + needs: build 100 + runs-on: ubuntu-latest 101 + steps: 102 + - name: Download all artifacts 103 + uses: actions/download-artifact@v4 104 + with: 105 + path: dist 106 + merge-multiple: true 107 + 108 + - name: Show artifacts 109 + run: ls -lh dist 110 + 111 + - name: Create release 112 + uses: softprops/action-gh-release@v2 113 + with: 114 + tag_name: ${{ github.event.inputs.tag || github.ref_name }} 115 + files: dist/* 116 + generate_release_notes: true 117 + draft: false 118 + prerelease: false
+1
Cargo.lock
··· 1976 1976 "clap", 1977 1977 "futures", 1978 1978 "hex", 1979 + "libsqlite3-sys", 1979 1980 "lofty", 1980 1981 "md-5", 1981 1982 "mime_guess",
+3
Cargo.toml
··· 11 11 actix-rt = "2" 12 12 tokio = { version = "1", features = ["full"] } 13 13 sqlx = { version = "0.8", features = ["runtime-tokio", "sqlite", "macros", "chrono"] } 14 + # Force libsqlite3-sys to vendor + build SQLite from source so cross builds 15 + # don't try to link the host system's libsqlite3. 16 + libsqlite3-sys = { version = "0.30", features = ["bundled"] } 14 17 serde = { version = "1", features = ["derive"] } 15 18 serde_json = "1" 16 19 toml = "0.8"
+17
Cross.toml
··· 1 + # Cross configuration. Pin the official cross-rs container images so the 2 + # toolchain (and bundled libsqlite3 build) is reproducible across machines. 3 + # 4 + # Build locally with: 5 + # cargo install cross --locked 6 + # cross build --release --target arm-unknown-linux-gnueabihf # armv6 (Pi 1/Zero) 7 + # cross build --release --target armv7-unknown-linux-gnueabihf # armv7 / armhf (Pi 2+) 8 + # cross build --release --target aarch64-unknown-linux-gnu # arm64 (Pi 4/5) 9 + 10 + [target.arm-unknown-linux-gnueabihf] 11 + image = "ghcr.io/cross-rs/arm-unknown-linux-gnueabihf:0.2.5" 12 + 13 + [target.armv7-unknown-linux-gnueabihf] 14 + image = "ghcr.io/cross-rs/armv7-unknown-linux-gnueabihf:0.2.5" 15 + 16 + [target.aarch64-unknown-linux-gnu] 17 + image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:0.2.5"