mirror of
https://github.com/tsirysndr/music-player.git
synced 2026-01-08 20:58:07 -05:00
chore: setup bazel build
This commit is contained in:
@@ -1 +1 @@
|
||||
5.4.0
|
||||
6.0.0
|
||||
30
BUILD
30
BUILD
@@ -1,4 +1,4 @@
|
||||
load("//cargo:crates.bzl", "all_crate_deps")
|
||||
load("@crate_index//:defs.bzl", "aliases", "all_crate_deps")
|
||||
load("@rules_rust//rust:defs.bzl", "rust_binary")
|
||||
|
||||
rust_binary(
|
||||
@@ -30,19 +30,19 @@ rust_binary(
|
||||
"src/user_config.rs",
|
||||
],
|
||||
deps = [
|
||||
"//addons:addons_lib",
|
||||
"//client:client_lib",
|
||||
"//discovery:discovery_lib",
|
||||
"//entity:entity_lib",
|
||||
"//graphql:graphql_lib",
|
||||
"//migration:migration_lib",
|
||||
"//playback:playback_lib",
|
||||
"//scanner:scanner_lib",
|
||||
"//server:server_lib",
|
||||
"//settings:settings_lib",
|
||||
"//storage:storage_lib",
|
||||
"//tracklist:tracklist_lib",
|
||||
"//types:types_lib",
|
||||
"//webui:webui_lib",
|
||||
"//addons:music_player_addons",
|
||||
"//client:music_player_client",
|
||||
"//discovery:music_player_discovery",
|
||||
"//entity:music_player_entity",
|
||||
"//graphql:music_player_graphql",
|
||||
"//migration:migration",
|
||||
"//playback:music_player_playback",
|
||||
"//scanner:music_player_scanner",
|
||||
"//server:music_player_server",
|
||||
"//settings:music_player_settings",
|
||||
"//storage:music_player_storage",
|
||||
"//tracklist:music_player_tracklist",
|
||||
"//types:music_player_types",
|
||||
"//webui:music_player_webui",
|
||||
] + all_crate_deps(),
|
||||
)
|
||||
661
BUILD.bazel
661
BUILD.bazel
@@ -1,661 +0,0 @@
|
||||
"""
|
||||
@generated
|
||||
cargo-raze generated Bazel file.
|
||||
|
||||
DO NOT EDIT! Replaced on runs of cargo-raze
|
||||
"""
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
licenses([
|
||||
"notice", # See individual crates for specific licenses
|
||||
])
|
||||
|
||||
# Aliased targets
|
||||
alias(
|
||||
name = "actix_cors",
|
||||
actual = "@raze__actix_cors__0_6_4//:actix_cors",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "actix_files",
|
||||
actual = "@raze__actix_files__0_6_2//:actix_files",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "actix_web",
|
||||
actual = "@raze__actix_web__4_2_1//:actix_web",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "async_graphql",
|
||||
actual = "@raze__async_graphql__4_0_15//:async_graphql",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "async_graphql_actix_web",
|
||||
actual = "@raze__async_graphql_actix_web__4_0_15//:async_graphql_actix_web",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "async_graphql_tide",
|
||||
actual = "@raze__async_graphql_tide__4_0_15//:async_graphql_tide",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "async_stream",
|
||||
actual = "@raze__async_stream__0_3_3//:async_stream",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "async_trait",
|
||||
actual = "@raze__async_trait__0_1_57//:async_trait",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "atlist_rs",
|
||||
actual = "@raze__atlist_rs__0_2_1//:atlist_rs",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "chrono",
|
||||
actual = "@raze__chrono__0_4_23//:chrono",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "clap",
|
||||
actual = "@raze__clap__3_2_22//:clap",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "config",
|
||||
actual = "@raze__config__0_13_2//:config",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "cpal",
|
||||
actual = "@raze__cpal__0_14_1//:cpal",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "crossterm",
|
||||
actual = "@raze__crossterm__0_25_0//:crossterm",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "ctor",
|
||||
actual = "@raze__ctor__0_1_26//:ctor",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "cuid",
|
||||
actual = "@raze__cuid__1_2_0//:cuid",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "dirs",
|
||||
actual = "@raze__dirs__4_0_0//:dirs",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "dotenv",
|
||||
actual = "@raze__dotenv__0_15_0//:dotenv",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "env_logger",
|
||||
actual = "@raze__env_logger__0_9_1//:env_logger",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "envtestkit",
|
||||
actual = "@raze__envtestkit__1_1_2//:envtestkit",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "futures",
|
||||
actual = "@raze__futures__0_3_24//:futures",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "futures_channel",
|
||||
actual = "@raze__futures_channel__0_3_25//:futures_channel",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "futures_util",
|
||||
actual = "@raze__futures_util__0_3_25//:futures_util",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "itertools",
|
||||
actual = "@raze__itertools__0_10_5//:itertools",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "lazy_static",
|
||||
actual = "@raze__lazy_static__1_4_0//:lazy_static",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "libmdns",
|
||||
actual = "@raze__libmdns__0_7_2//:libmdns",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "librespot_protocol",
|
||||
actual = "@raze__librespot_protocol__0_4_2//:librespot_protocol",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "lofty",
|
||||
actual = "@raze__lofty__0_9_0//:lofty",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "log",
|
||||
actual = "@raze__log__0_4_17//:log",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "md5",
|
||||
actual = "@raze__md5__0_7_0//:md5",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "mdns",
|
||||
actual = "@raze__mdns__3_0_0//:mdns",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "mdns_sd",
|
||||
actual = "@raze__mdns_sd__0_5_8//:mdns_sd",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "mime_guess",
|
||||
actual = "@raze__mime_guess__2_0_4//:mime_guess",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "once_cell",
|
||||
actual = "@raze__once_cell__1_16_0//:once_cell",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "owo_colors",
|
||||
actual = "@raze__owo_colors__3_5_0//:owo_colors",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "parking_lot",
|
||||
actual = "@raze__parking_lot__0_12_1//:parking_lot",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "prost",
|
||||
actual = "@raze__prost__0_11_0//:prost",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "rand",
|
||||
actual = "@raze__rand__0_8_5//:rand",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "rand_distr",
|
||||
actual = "@raze__rand_distr__0_4_3//:rand_distr",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "rb",
|
||||
actual = "@raze__rb__0_4_1//:rb",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "rodio",
|
||||
actual = "@raze__rodio__0_16_0//:rodio",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "rust_embed",
|
||||
actual = "@raze__rust_embed__6_4_1//:rust_embed",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "sea_orm",
|
||||
actual = "@raze__sea_orm__0_9_3//:sea_orm",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "sea_orm_migration",
|
||||
actual = "@raze__sea_orm_migration__0_9_3//:sea_orm_migration",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "serde",
|
||||
actual = "@raze__serde__1_0_148//:serde",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "serde_derive",
|
||||
actual = "@raze__serde_derive__1_0_148//:serde_derive",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "serde_json",
|
||||
actual = "@raze__serde_json__1_0_89//:serde_json",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "slab",
|
||||
actual = "@raze__slab__0_4_7//:slab",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "spinners",
|
||||
actual = "@raze__spinners__4_1_0//:spinners",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "surf",
|
||||
actual = "@raze__surf__2_3_2//:surf",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "symphonia",
|
||||
actual = "@raze__symphonia__0_5_1//:symphonia",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "tabled",
|
||||
actual = "@raze__tabled__0_8_0//:tabled",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "tantivy",
|
||||
actual = "@raze__tantivy__0_18_1//:tantivy",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "tauri",
|
||||
actual = "@raze__tauri__1_2_1//:tauri",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "tauri_build",
|
||||
actual = "@raze__tauri_build__1_2_1//:tauri_build",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "tempfile",
|
||||
actual = "@raze__tempfile__3_3_0//:tempfile",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "thiserror",
|
||||
actual = "@raze__thiserror__1_0_37//:thiserror",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "tide",
|
||||
actual = "@raze__tide__0_16_0//:tide",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "tokio",
|
||||
actual = "@raze__tokio__1_22_0//:tokio",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "tokio_tungstenite",
|
||||
actual = "@raze__tokio_tungstenite__0_17_2//:tokio_tungstenite",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "toml",
|
||||
actual = "@raze__toml__0_5_9//:toml",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "tonic",
|
||||
actual = "@raze__tonic__0_8_2//:tonic",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "tonic_build",
|
||||
actual = "@raze__tonic_build__0_8_2//:tonic_build",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "tonic_web",
|
||||
actual = "@raze__tonic_web__0_4_0//:tonic_web",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "tui",
|
||||
actual = "@raze__tui__0_19_0//:tui",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "tungstenite",
|
||||
actual = "@raze__tungstenite__0_17_3//:tungstenite",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "url",
|
||||
actual = "@raze__url__2_3_1//:url",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "uuid",
|
||||
actual = "@raze__uuid__1_2_1//:uuid",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "walkdir",
|
||||
actual = "@raze__walkdir__2_3_2//:walkdir",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "zerocopy",
|
||||
actual = "@raze__zerocopy__0_6_1//:zerocopy",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
# Export file for Stardoc support
|
||||
exports_files(
|
||||
glob([
|
||||
"**/*.bazel",
|
||||
"**/*.bzl",
|
||||
]),
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "srcs",
|
||||
srcs = glob([
|
||||
"**/*.bazel",
|
||||
"**/*.bzl",
|
||||
]),
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
1062
Cargo.lock
generated
1062
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
160
WORKSPACE
160
WORKSPACE
@@ -1,11 +1,20 @@
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
|
||||
http_archive(
|
||||
name = "platforms",
|
||||
sha256 = "5308fc1d8865406a49427ba24a9ab53087f17f5266a7aabbfc28823f3916e1ca",
|
||||
urls = [
|
||||
"https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.6/platforms-0.0.6.tar.gz",
|
||||
"https://github.com/bazelbuild/platforms/releases/download/0.0.6/platforms-0.0.6.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
# To find additional information on this release or newer ones visit:
|
||||
# https://github.com/bazelbuild/rules_rust/releases
|
||||
http_archive(
|
||||
name = "rules_rust",
|
||||
sha256 = "696b01deea96a5e549f1b5ae18589e1bbd5a1d71a36a243b5cf76a9433487cf2",
|
||||
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.11.0/rules_rust-v0.11.0.tar.gz"],
|
||||
sha256 = "5c2b6745236f8ce547f82eeacbbcc81d736734cc8bd92e60d3e3cdfa6e167bb5",
|
||||
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.15.0/rules_rust-v0.15.0.tar.gz"],
|
||||
)
|
||||
|
||||
http_archive(
|
||||
@@ -15,31 +24,154 @@ http_archive(
|
||||
urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/archive/4.3.0.tar.gz"],
|
||||
)
|
||||
|
||||
#
|
||||
# Nix
|
||||
#
|
||||
http_archive(
|
||||
name = "io_tweag_rules_nixpkgs",
|
||||
sha256 = "b01f170580f646ee3cde1ea4c117d00e561afaf3c59eda604cf09194a824ff10",
|
||||
strip_prefix = "rules_nixpkgs-0.9.0",
|
||||
urls = ["https://github.com/tweag/rules_nixpkgs/archive/v0.9.0.tar.gz"],
|
||||
)
|
||||
|
||||
load("@io_tweag_rules_nixpkgs//nixpkgs:repositories.bzl", "rules_nixpkgs_dependencies")
|
||||
|
||||
rules_nixpkgs_dependencies()
|
||||
|
||||
load("@io_tweag_rules_nixpkgs//nixpkgs:nixpkgs.bzl", "nixpkgs_cc_configure", "nixpkgs_git_repository", "nixpkgs_package")
|
||||
|
||||
nixpkgs_git_repository(
|
||||
name = "nixpkgs",
|
||||
revision = "22.11",
|
||||
)
|
||||
|
||||
nixpkgs_cc_configure(
|
||||
name = "nixpkgs_config_cc",
|
||||
repository = "@nixpkgs",
|
||||
)
|
||||
|
||||
load("@io_tweag_rules_nixpkgs//nixpkgs:nixpkgs.bzl", "nixpkgs_package")
|
||||
|
||||
nixpkgs_package(
|
||||
name = "curlFull",
|
||||
repository = "@nixpkgs",
|
||||
)
|
||||
|
||||
nixpkgs_package(
|
||||
name = "curl.dev",
|
||||
build_file_content = """\
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
filegroup(
|
||||
name = "include",
|
||||
srcs = glob(["include/**/*.h"]),
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
cc_library(
|
||||
name = "curl",
|
||||
srcs = ["@curlFull//:lib"],
|
||||
hdrs = [":include"],
|
||||
strip_include_prefix = "include",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
""",
|
||||
repository = "@nixpkgs",
|
||||
)
|
||||
|
||||
nixpkgs_package(
|
||||
name = "libnghttp2",
|
||||
repository = "@nixpkgs",
|
||||
)
|
||||
|
||||
nixpkgs_package(
|
||||
name = "libnghttp2.dev",
|
||||
build_file_content = """\
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
filegroup(
|
||||
name = "include",
|
||||
srcs = glob(["include/**/*.h"]),
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
cc_library(
|
||||
name = "libnghttp2",
|
||||
srcs = ["@libnghttp2//:lib"],
|
||||
hdrs = [":include"],
|
||||
strip_include_prefix = "include",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
""",
|
||||
repository = "@nixpkgs",
|
||||
)
|
||||
|
||||
load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains")
|
||||
|
||||
rules_rust_dependencies()
|
||||
|
||||
rust_register_toolchains(version = "1.65.0", edition="2021")
|
||||
rust_register_toolchains(
|
||||
edition = "2021",
|
||||
version = "1.65.0",
|
||||
)
|
||||
|
||||
|
||||
load("@rules_proto_grpc//:repositories.bzl", "rules_proto_grpc_repos", "rules_proto_grpc_toolchains")
|
||||
load("@rules_rust//proto:repositories.bzl", "rust_proto_repositories")
|
||||
|
||||
rules_proto_grpc_toolchains()
|
||||
rust_proto_repositories()
|
||||
|
||||
rules_proto_grpc_repos()
|
||||
load("@rules_rust//proto:transitive_repositories.bzl", "rust_proto_transitive_repositories")
|
||||
|
||||
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
|
||||
rust_proto_transitive_repositories()
|
||||
|
||||
rules_proto_dependencies()
|
||||
load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies")
|
||||
|
||||
rules_proto_toolchains()
|
||||
crate_universe_dependencies(
|
||||
bootstrap = True,
|
||||
rust_version = "1.65.0",
|
||||
)
|
||||
|
||||
load("@rules_proto_grpc//rust:repositories.bzl", rules_proto_grpc_rust_repos = "rust_repos")
|
||||
load("@rules_rust//crate_universe:defs.bzl", "crate", "crates_repository", "render_config", "splicing_config")
|
||||
|
||||
rules_proto_grpc_rust_repos()
|
||||
crates_repository(
|
||||
name = "crate_index",
|
||||
annotations = {
|
||||
"curl-sys": [crate.annotation(
|
||||
gen_build_script = False,
|
||||
data = [
|
||||
"@curl.dev//:curl",
|
||||
"@libnghttp2.dev//:libnghttp2",
|
||||
],
|
||||
deps = [
|
||||
"@curl.dev//:curl",
|
||||
"@libnghttp2.dev//:libnghttp2",
|
||||
],
|
||||
)],
|
||||
},
|
||||
cargo_lockfile = "//:Cargo.lock",
|
||||
lockfile = "//:cargo-bazel-lock.json",
|
||||
manifests = [
|
||||
"//:Cargo.toml",
|
||||
"//addons:Cargo.toml",
|
||||
"//client:Cargo.toml",
|
||||
"//discovery:Cargo.toml",
|
||||
"//entity:Cargo.toml",
|
||||
"//graphql:Cargo.toml",
|
||||
"//migration:Cargo.toml",
|
||||
"//playback:Cargo.toml",
|
||||
"//scanner:Cargo.toml",
|
||||
"//server:Cargo.toml",
|
||||
"//settings:Cargo.toml",
|
||||
"//storage:Cargo.toml",
|
||||
"//tracklist:Cargo.toml",
|
||||
"//types:Cargo.toml",
|
||||
"//webui/musicplayer/src-tauri:Cargo.toml",
|
||||
"//webui:Cargo.toml",
|
||||
],
|
||||
splicing_config = splicing_config(
|
||||
resolver_version = "2",
|
||||
),
|
||||
render_config = render_config(
|
||||
default_package_name = "",
|
||||
),
|
||||
)
|
||||
|
||||
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
|
||||
|
||||
grpc_deps()
|
||||
load("@crate_index//:defs.bzl", "crate_repositories")
|
||||
|
||||
crate_repositories()
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//cargo:crates.bzl", "all_crate_deps")
|
||||
load("@crate_index//:defs.bzl", "aliases", "all_crate_deps")
|
||||
load("@rules_rust//rust:defs.bzl", "rust_library")
|
||||
|
||||
rust_library(
|
||||
name = "addons_lib",
|
||||
name = "music_player_addons",
|
||||
srcs = [
|
||||
"src/datpiff.rs",
|
||||
"src/deezer.rs",
|
||||
|
||||
46811
cargo-bazel-lock.json
Normal file
46811
cargo-bazel-lock.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,24 +0,0 @@
|
||||
"""
|
||||
@generated
|
||||
cargo-raze generated Bazel file.
|
||||
|
||||
DO NOT EDIT! Replaced on runs of cargo-raze
|
||||
"""
|
||||
|
||||
# Export file for Stardoc support
|
||||
exports_files(
|
||||
glob([
|
||||
"**/*.bazel",
|
||||
"**/*.bzl",
|
||||
]),
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "srcs",
|
||||
srcs = glob([
|
||||
"**/*.bazel",
|
||||
"**/*.bzl",
|
||||
]),
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
418
cargo/crates.bzl
418
cargo/crates.bzl
@@ -1,418 +0,0 @@
|
||||
"""
|
||||
@generated
|
||||
cargo-raze generated Bazel file.
|
||||
|
||||
DO NOT EDIT! Replaced on runs of cargo-raze
|
||||
"""
|
||||
|
||||
# EXPERIMENTAL -- MAY CHANGE AT ANY TIME: A mapping of package names to a set of normal dependencies for the Rust targets of that package.
|
||||
_DEPENDENCIES = {
|
||||
"addons": {
|
||||
},
|
||||
"client": {
|
||||
"futures-util": "//cargo/vendor/futures-util-0.3.25:futures_util",
|
||||
"tokio": "//cargo/vendor/tokio-1.22.0:tokio",
|
||||
"tokio-tungstenite": "//cargo/vendor/tokio-tungstenite-0.17.2:tokio_tungstenite",
|
||||
"tonic": "//cargo/vendor/tonic-0.8.2:tonic",
|
||||
"url": "//cargo/vendor/url-2.3.1:url",
|
||||
},
|
||||
"server": {
|
||||
"chrono": "//cargo/vendor/chrono-0.4.23:chrono",
|
||||
"cuid": "//cargo/vendor/cuid-1.2.0:cuid",
|
||||
"futures": "//cargo/vendor/futures-0.3.24:futures",
|
||||
"futures-channel": "//cargo/vendor/futures-channel-0.3.25:futures_channel",
|
||||
"futures-util": "//cargo/vendor/futures-util-0.3.25:futures_util",
|
||||
"md5": "//cargo/vendor/md5-0.7.0:md5",
|
||||
"owo-colors": "//cargo/vendor/owo-colors-3.5.0:owo_colors",
|
||||
"prost": "//cargo/vendor/prost-0.11.0:prost",
|
||||
"sea-orm": "//cargo/vendor/sea-orm-0.9.3:sea_orm",
|
||||
"serde": "//cargo/vendor/serde-1.0.148:serde",
|
||||
"tokio": "//cargo/vendor/tokio-1.22.0:tokio",
|
||||
"tokio-tungstenite": "//cargo/vendor/tokio-tungstenite-0.17.2:tokio_tungstenite",
|
||||
"tonic": "//cargo/vendor/tonic-0.8.2:tonic",
|
||||
"tonic-web": "//cargo/vendor/tonic-web-0.4.0:tonic_web",
|
||||
"tungstenite": "//cargo/vendor/tungstenite-0.17.3:tungstenite",
|
||||
"uuid": "//cargo/vendor/uuid-1.2.1:uuid",
|
||||
},
|
||||
"entity": {
|
||||
"chrono": "//cargo/vendor/chrono-0.4.23:chrono",
|
||||
"md5": "//cargo/vendor/md5-0.7.0:md5",
|
||||
"sea-orm": "//cargo/vendor/sea-orm-0.9.3:sea_orm",
|
||||
"serde": "//cargo/vendor/serde-1.0.148:serde",
|
||||
},
|
||||
"types": {
|
||||
"lofty": "//cargo/vendor/lofty-0.9.0:lofty",
|
||||
"md5": "//cargo/vendor/md5-0.7.0:md5",
|
||||
"tantivy": "//cargo/vendor/tantivy-0.18.1:tantivy",
|
||||
},
|
||||
"playback": {
|
||||
"cpal": "//cargo/vendor/cpal-0.14.1:cpal",
|
||||
"futures-util": "//cargo/vendor/futures-util-0.3.25:futures_util",
|
||||
"lazy_static": "//cargo/vendor/lazy_static-1.4.0:lazy_static",
|
||||
"librespot-protocol": "//cargo/vendor/librespot-protocol-0.4.2:librespot_protocol",
|
||||
"log": "//cargo/vendor/log-0.4.17:log",
|
||||
"owo-colors": "//cargo/vendor/owo-colors-3.5.0:owo_colors",
|
||||
"parking_lot": "//cargo/vendor/parking_lot-0.12.1:parking_lot",
|
||||
"rand": "//cargo/vendor/rand-0.8.5:rand",
|
||||
"rand_distr": "//cargo/vendor/rand_distr-0.4.3:rand_distr",
|
||||
"rb": "//cargo/vendor/rb-0.4.1:rb",
|
||||
"rodio": "//cargo/vendor/rodio-0.16.0:rodio",
|
||||
"symphonia": "//cargo/vendor/symphonia-0.5.1:symphonia",
|
||||
"thiserror": "//cargo/vendor/thiserror-1.0.37:thiserror",
|
||||
"tokio": "//cargo/vendor/tokio-1.22.0:tokio",
|
||||
"zerocopy": "//cargo/vendor/zerocopy-0.6.1:zerocopy",
|
||||
},
|
||||
"tracklist": {
|
||||
"atlist-rs": "//cargo/vendor/atlist-rs-0.2.1:atlist_rs",
|
||||
"rand": "//cargo/vendor/rand-0.8.5:rand",
|
||||
},
|
||||
"scanner": {
|
||||
"dirs": "//cargo/vendor/dirs-4.0.0:dirs",
|
||||
"futures": "//cargo/vendor/futures-0.3.24:futures",
|
||||
"lofty": "//cargo/vendor/lofty-0.9.0:lofty",
|
||||
"md5": "//cargo/vendor/md5-0.7.0:md5",
|
||||
"mime_guess": "//cargo/vendor/mime_guess-2.0.4:mime_guess",
|
||||
"sea-orm": "//cargo/vendor/sea-orm-0.9.3:sea_orm",
|
||||
"tokio": "//cargo/vendor/tokio-1.22.0:tokio",
|
||||
"walkdir": "//cargo/vendor/walkdir-2.3.2:walkdir",
|
||||
},
|
||||
"migration": {
|
||||
"dotenv": "//cargo/vendor/dotenv-0.15.0:dotenv",
|
||||
"sea-orm-migration": "//cargo/vendor/sea-orm-migration-0.9.3:sea_orm_migration",
|
||||
"tokio": "//cargo/vendor/tokio-1.22.0:tokio",
|
||||
},
|
||||
"settings": {
|
||||
"config": "//cargo/vendor/config-0.13.2:config",
|
||||
"dirs": "//cargo/vendor/dirs-4.0.0:dirs",
|
||||
"md5": "//cargo/vendor/md5-0.7.0:md5",
|
||||
"serde": "//cargo/vendor/serde-1.0.148:serde",
|
||||
"toml": "//cargo/vendor/toml-0.5.9:toml",
|
||||
"uuid": "//cargo/vendor/uuid-1.2.1:uuid",
|
||||
},
|
||||
"storage": {
|
||||
"itertools": "//cargo/vendor/itertools-0.10.5:itertools",
|
||||
"md5": "//cargo/vendor/md5-0.7.0:md5",
|
||||
"sea-orm": "//cargo/vendor/sea-orm-0.9.3:sea_orm",
|
||||
"tantivy": "//cargo/vendor/tantivy-0.18.1:tantivy",
|
||||
"tempfile": "//cargo/vendor/tempfile-3.3.0:tempfile",
|
||||
"tokio": "//cargo/vendor/tokio-1.22.0:tokio",
|
||||
},
|
||||
"discovery": {
|
||||
"async-stream": "//cargo/vendor/async-stream-0.3.3:async_stream",
|
||||
"env_logger": "//cargo/vendor/env_logger-0.9.1:env_logger",
|
||||
"futures-util": "//cargo/vendor/futures-util-0.3.25:futures_util",
|
||||
"libmdns": "//cargo/vendor/libmdns-0.7.2:libmdns",
|
||||
"mdns": "//cargo/vendor/mdns-3.0.0:mdns",
|
||||
"mdns-sd": "//cargo/vendor/mdns-sd-0.5.8:mdns_sd",
|
||||
"owo-colors": "//cargo/vendor/owo-colors-3.5.0:owo_colors",
|
||||
"tokio": "//cargo/vendor/tokio-1.22.0:tokio",
|
||||
},
|
||||
"graphql": {
|
||||
"async-graphql": "//cargo/vendor/async-graphql-4.0.15:async_graphql",
|
||||
"async-graphql-tide": "//cargo/vendor/async-graphql-tide-4.0.15:async_graphql_tide",
|
||||
"chrono": "//cargo/vendor/chrono-0.4.23:chrono",
|
||||
"cuid": "//cargo/vendor/cuid-1.2.0:cuid",
|
||||
"futures-channel": "//cargo/vendor/futures-channel-0.3.25:futures_channel",
|
||||
"futures-util": "//cargo/vendor/futures-util-0.3.25:futures_util",
|
||||
"md5": "//cargo/vendor/md5-0.7.0:md5",
|
||||
"once_cell": "//cargo/vendor/once_cell-1.16.0:once_cell",
|
||||
"rand": "//cargo/vendor/rand-0.8.5:rand",
|
||||
"sea-orm": "//cargo/vendor/sea-orm-0.9.3:sea_orm",
|
||||
"serde": "//cargo/vendor/serde-1.0.148:serde",
|
||||
"slab": "//cargo/vendor/slab-0.4.7:slab",
|
||||
"tide": "//cargo/vendor/tide-0.16.0:tide",
|
||||
"tokio": "//cargo/vendor/tokio-1.22.0:tokio",
|
||||
},
|
||||
"webui": {
|
||||
"actix-cors": "//cargo/vendor/actix-cors-0.6.4:actix_cors",
|
||||
"actix-files": "//cargo/vendor/actix-files-0.6.2:actix_files",
|
||||
"actix-web": "//cargo/vendor/actix-web-4.2.1:actix_web",
|
||||
"async-graphql": "//cargo/vendor/async-graphql-4.0.15:async_graphql",
|
||||
"async-graphql-actix-web": "//cargo/vendor/async-graphql-actix-web-4.0.15:async_graphql_actix_web",
|
||||
"dirs": "//cargo/vendor/dirs-4.0.0:dirs",
|
||||
"mime_guess": "//cargo/vendor/mime_guess-2.0.4:mime_guess",
|
||||
"owo-colors": "//cargo/vendor/owo-colors-3.5.0:owo_colors",
|
||||
"rust-embed": "//cargo/vendor/rust-embed-6.4.1:rust_embed",
|
||||
"sea-orm": "//cargo/vendor/sea-orm-0.9.3:sea_orm",
|
||||
"serde": "//cargo/vendor/serde-1.0.148:serde",
|
||||
"tokio": "//cargo/vendor/tokio-1.22.0:tokio",
|
||||
},
|
||||
"webui/musicplayer/src-tauri": {
|
||||
"actix-web": "//cargo/vendor/actix-web-4.2.1:actix_web",
|
||||
"async-graphql": "//cargo/vendor/async-graphql-4.0.15:async_graphql",
|
||||
"async-graphql-actix-web": "//cargo/vendor/async-graphql-actix-web-4.0.15:async_graphql_actix_web",
|
||||
"futures": "//cargo/vendor/futures-0.3.24:futures",
|
||||
"serde": "//cargo/vendor/serde-1.0.148:serde",
|
||||
"serde_json": "//cargo/vendor/serde_json-1.0.89:serde_json",
|
||||
"tauri": "//cargo/vendor/tauri-1.2.1:tauri",
|
||||
"tokio": "//cargo/vendor/tokio-1.22.0:tokio",
|
||||
"uuid": "//cargo/vendor/uuid-1.2.1:uuid",
|
||||
},
|
||||
"": {
|
||||
"clap": "//cargo/vendor/clap-3.2.22:clap",
|
||||
"crossterm": "//cargo/vendor/crossterm-0.25.0:crossterm",
|
||||
"dirs": "//cargo/vendor/dirs-4.0.0:dirs",
|
||||
"futures": "//cargo/vendor/futures-0.3.24:futures",
|
||||
"futures-channel": "//cargo/vendor/futures-channel-0.3.25:futures_channel",
|
||||
"lofty": "//cargo/vendor/lofty-0.9.0:lofty",
|
||||
"md5": "//cargo/vendor/md5-0.7.0:md5",
|
||||
"owo-colors": "//cargo/vendor/owo-colors-3.5.0:owo_colors",
|
||||
"sea-orm": "//cargo/vendor/sea-orm-0.9.3:sea_orm",
|
||||
"sea-orm-migration": "//cargo/vendor/sea-orm-migration-0.9.3:sea_orm_migration",
|
||||
"serde_json": "//cargo/vendor/serde_json-1.0.89:serde_json",
|
||||
"spinners": "//cargo/vendor/spinners-4.1.0:spinners",
|
||||
"tabled": "//cargo/vendor/tabled-0.8.0:tabled",
|
||||
"tokio": "//cargo/vendor/tokio-1.22.0:tokio",
|
||||
"tui": "//cargo/vendor/tui-0.19.0:tui",
|
||||
"tungstenite": "//cargo/vendor/tungstenite-0.17.3:tungstenite",
|
||||
},
|
||||
}
|
||||
|
||||
# EXPERIMENTAL -- MAY CHANGE AT ANY TIME: A mapping of package names to a set of proc_macro dependencies for the Rust targets of that package.
|
||||
_PROC_MACRO_DEPENDENCIES = {
|
||||
"addons": {
|
||||
},
|
||||
"client": {
|
||||
},
|
||||
"server": {
|
||||
},
|
||||
"entity": {
|
||||
},
|
||||
"types": {
|
||||
},
|
||||
"playback": {
|
||||
"async-trait": "//cargo/vendor/async-trait-0.1.57:async_trait",
|
||||
},
|
||||
"tracklist": {
|
||||
},
|
||||
"scanner": {
|
||||
},
|
||||
"migration": {
|
||||
},
|
||||
"settings": {
|
||||
},
|
||||
"storage": {
|
||||
},
|
||||
"discovery": {
|
||||
},
|
||||
"graphql": {
|
||||
},
|
||||
"webui": {
|
||||
"serde_derive": "//cargo/vendor/serde_derive-1.0.148:serde_derive",
|
||||
},
|
||||
"webui/musicplayer/src-tauri": {
|
||||
},
|
||||
"": {
|
||||
},
|
||||
}
|
||||
|
||||
# EXPERIMENTAL -- MAY CHANGE AT ANY TIME: A mapping of package names to a set of normal dev dependencies for the Rust targets of that package.
|
||||
_DEV_DEPENDENCIES = {
|
||||
"addons": {
|
||||
},
|
||||
"client": {
|
||||
"envtestkit": "//cargo/vendor/envtestkit-1.1.2:envtestkit",
|
||||
"tonic-web": "//cargo/vendor/tonic-web-0.4.0:tonic_web",
|
||||
},
|
||||
"server": {
|
||||
},
|
||||
"entity": {
|
||||
},
|
||||
"types": {
|
||||
},
|
||||
"playback": {
|
||||
},
|
||||
"tracklist": {
|
||||
},
|
||||
"scanner": {
|
||||
},
|
||||
"migration": {
|
||||
},
|
||||
"settings": {
|
||||
},
|
||||
"storage": {
|
||||
},
|
||||
"discovery": {
|
||||
},
|
||||
"graphql": {
|
||||
},
|
||||
"webui": {
|
||||
"futures-util": "//cargo/vendor/futures-util-0.3.25:futures_util",
|
||||
"serde_json": "//cargo/vendor/serde_json-1.0.89:serde_json",
|
||||
"surf": "//cargo/vendor/surf-2.3.2:surf",
|
||||
},
|
||||
"webui/musicplayer/src-tauri": {
|
||||
},
|
||||
"": {
|
||||
},
|
||||
}
|
||||
|
||||
# EXPERIMENTAL -- MAY CHANGE AT ANY TIME: A mapping of package names to a set of proc_macro dev dependencies for the Rust targets of that package.
|
||||
_DEV_PROC_MACRO_DEPENDENCIES = {
|
||||
"addons": {
|
||||
},
|
||||
"client": {
|
||||
},
|
||||
"server": {
|
||||
},
|
||||
"entity": {
|
||||
},
|
||||
"types": {
|
||||
},
|
||||
"playback": {
|
||||
},
|
||||
"tracklist": {
|
||||
},
|
||||
"scanner": {
|
||||
},
|
||||
"migration": {
|
||||
},
|
||||
"settings": {
|
||||
},
|
||||
"storage": {
|
||||
},
|
||||
"discovery": {
|
||||
},
|
||||
"graphql": {
|
||||
"ctor": "//cargo/vendor/ctor-0.1.26:ctor",
|
||||
},
|
||||
"webui": {
|
||||
},
|
||||
"webui/musicplayer/src-tauri": {
|
||||
},
|
||||
"": {
|
||||
},
|
||||
}
|
||||
|
||||
def crate_deps(deps, package_name = None):
|
||||
"""EXPERIMENTAL -- MAY CHANGE AT ANY TIME: Finds the fully qualified label of the requested crates for the package where this macro is called.
|
||||
|
||||
WARNING: This macro is part of an expeirmental API and is subject to change.
|
||||
|
||||
Args:
|
||||
deps (list): The desired list of crate targets.
|
||||
package_name (str, optional): The package name of the set of dependencies to look up.
|
||||
Defaults to `native.package_name()`.
|
||||
Returns:
|
||||
list: A list of labels to cargo-raze generated targets (str)
|
||||
"""
|
||||
|
||||
if not package_name:
|
||||
package_name = native.package_name()
|
||||
|
||||
# Join both sets of dependencies
|
||||
dependencies = _flatten_dependency_maps([
|
||||
_DEPENDENCIES,
|
||||
_PROC_MACRO_DEPENDENCIES,
|
||||
_DEV_DEPENDENCIES,
|
||||
_DEV_PROC_MACRO_DEPENDENCIES,
|
||||
])
|
||||
|
||||
if not deps:
|
||||
return []
|
||||
|
||||
missing_crates = []
|
||||
crate_targets = []
|
||||
for crate_target in deps:
|
||||
if crate_target not in dependencies[package_name]:
|
||||
missing_crates.append(crate_target)
|
||||
else:
|
||||
crate_targets.append(dependencies[package_name][crate_target])
|
||||
|
||||
if missing_crates:
|
||||
fail("Could not find crates `{}` among dependencies of `{}`. Available dependencies were `{}`".format(
|
||||
missing_crates,
|
||||
package_name,
|
||||
dependencies[package_name],
|
||||
))
|
||||
|
||||
return crate_targets
|
||||
|
||||
def all_crate_deps(normal = False, normal_dev = False, proc_macro = False, proc_macro_dev = False, package_name = None):
|
||||
"""EXPERIMENTAL -- MAY CHANGE AT ANY TIME: Finds the fully qualified label of all requested direct crate dependencies \
|
||||
for the package where this macro is called.
|
||||
|
||||
If no parameters are set, all normal dependencies are returned. Setting any one flag will
|
||||
otherwise impact the contents of the returned list.
|
||||
|
||||
Args:
|
||||
normal (bool, optional): If True, normal dependencies are included in the
|
||||
output list. Defaults to False.
|
||||
normal_dev (bool, optional): If True, normla dev dependencies will be
|
||||
included in the output list. Defaults to False.
|
||||
proc_macro (bool, optional): If True, proc_macro dependencies are included
|
||||
in the output list. Defaults to False.
|
||||
proc_macro_dev (bool, optional): If True, dev proc_macro dependencies are
|
||||
included in the output list. Defaults to False.
|
||||
package_name (str, optional): The package name of the set of dependencies to look up.
|
||||
Defaults to `native.package_name()`.
|
||||
|
||||
Returns:
|
||||
list: A list of labels to cargo-raze generated targets (str)
|
||||
"""
|
||||
|
||||
if not package_name:
|
||||
package_name = native.package_name()
|
||||
|
||||
# Determine the relevant maps to use
|
||||
all_dependency_maps = []
|
||||
if normal:
|
||||
all_dependency_maps.append(_DEPENDENCIES)
|
||||
if normal_dev:
|
||||
all_dependency_maps.append(_DEV_DEPENDENCIES)
|
||||
if proc_macro:
|
||||
all_dependency_maps.append(_PROC_MACRO_DEPENDENCIES)
|
||||
if proc_macro_dev:
|
||||
all_dependency_maps.append(_DEV_PROC_MACRO_DEPENDENCIES)
|
||||
|
||||
# Default to always using normal dependencies
|
||||
if not all_dependency_maps:
|
||||
all_dependency_maps.append(_DEPENDENCIES)
|
||||
|
||||
dependencies = _flatten_dependency_maps(all_dependency_maps)
|
||||
|
||||
if not dependencies:
|
||||
return []
|
||||
|
||||
return dependencies[package_name].values()
|
||||
|
||||
def _flatten_dependency_maps(all_dependency_maps):
|
||||
"""Flatten a list of dependency maps into one dictionary.
|
||||
|
||||
Dependency maps have the following structure:
|
||||
|
||||
```python
|
||||
DEPENDENCIES_MAP = {
|
||||
# The first key in the map is a Bazel package
|
||||
# name of the workspace this file is defined in.
|
||||
"package_name": {
|
||||
|
||||
# An alias to a crate target. # The label of the crate target the
|
||||
# Aliases are only crate names. # alias refers to.
|
||||
"alias": "@full//:label",
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Args:
|
||||
all_dependency_maps (list): A list of dicts as described above
|
||||
|
||||
Returns:
|
||||
dict: A dictionary as described above
|
||||
"""
|
||||
dependencies = {}
|
||||
|
||||
for dep_map in all_dependency_maps:
|
||||
for pkg_name in dep_map:
|
||||
if pkg_name not in dependencies:
|
||||
# Add a non-frozen dict to the collection of dependencies
|
||||
dependencies.setdefault(pkg_name, dict(dep_map[pkg_name].items()))
|
||||
continue
|
||||
|
||||
duplicate_crate_aliases = [key for key in dependencies[pkg_name] if key in dep_map[pkg_name]]
|
||||
if duplicate_crate_aliases:
|
||||
fail("There should be no duplicate crate aliases: {}".format(duplicate_crate_aliases))
|
||||
|
||||
dependencies[pkg_name].update(dep_map[pkg_name])
|
||||
|
||||
return dependencies
|
||||
21
client/BUILD
21
client/BUILD
@@ -1,10 +1,10 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//cargo:crates.bzl", "all_crate_deps")
|
||||
load("@crate_index//:defs.bzl", "aliases", "all_crate_deps")
|
||||
load("@rules_rust//rust:defs.bzl", "rust_library")
|
||||
|
||||
rust_library(
|
||||
name = "client_lib",
|
||||
name = "music_player_client",
|
||||
srcs = [
|
||||
"src/lib.rs",
|
||||
"src/library.rs",
|
||||
@@ -14,10 +14,17 @@ rust_library(
|
||||
"src/ws_client.rs",
|
||||
],
|
||||
deps = [
|
||||
"//server:server_lib",
|
||||
"//settings:settings_lib",
|
||||
"//playback:playback_lib",
|
||||
"//storage:storage_lib",
|
||||
"//tracklist:tracklist_lib",
|
||||
"//server:music_player_server",
|
||||
"//settings:music_player_settings",
|
||||
"//playback:music_player_playback",
|
||||
"//storage:music_player_storage",
|
||||
"//tracklist:music_player_tracklist",
|
||||
"@crate_index//:tonic",
|
||||
"@crate_index//:futures-util",
|
||||
"@crate_index//:url",
|
||||
"@crate_index//:serde",
|
||||
"@crate_index//:tokio-tungstenite",
|
||||
"@crate_index//:tungstenite",
|
||||
"@crate_index//:tokio",
|
||||
] + all_crate_deps(),
|
||||
)
|
||||
@@ -1,9 +1,9 @@
|
||||
use music_player_server::{
|
||||
api::v1alpha1::{
|
||||
use music_player_server::api::{
|
||||
metadata::v1alpha1::{Album, Artist, Track},
|
||||
music::v1alpha1::{
|
||||
library_service_client::LibraryServiceClient, GetAlbumDetailsRequest, GetAlbumsRequest,
|
||||
GetArtistDetailsRequest, GetArtistsRequest, GetTracksRequest,
|
||||
},
|
||||
metadata::v1alpha1::{Album, Artist, Track},
|
||||
};
|
||||
use music_player_settings::{read_settings, Settings};
|
||||
use tonic::transport::Channel;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use music_player_server::{
|
||||
api::v1alpha1::{
|
||||
use music_player_server::api::{
|
||||
metadata::v1alpha1::Track,
|
||||
music::v1alpha1::{
|
||||
playback_service_client::PlaybackServiceClient, GetCurrentlyPlayingSongRequest,
|
||||
NextRequest, PauseRequest, PlayRequest, PreviousRequest, StopRequest,
|
||||
},
|
||||
metadata::v1alpha1::Track,
|
||||
};
|
||||
use music_player_settings::{read_settings, Settings};
|
||||
use tonic::{codegen::http::request, transport::Channel};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use music_player_server::api::v1alpha1::playlist_service_client::PlaylistServiceClient;
|
||||
use music_player_server::api::music::v1alpha1::playlist_service_client::PlaylistServiceClient;
|
||||
use music_player_settings::{read_settings, Settings};
|
||||
use tonic::transport::Channel;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use futures_util::FutureExt;
|
||||
use music_player_playback::player::Player;
|
||||
use music_player_server::{
|
||||
api::v1alpha1::{
|
||||
api::music::v1alpha1::{
|
||||
playback_service_server::PlaybackServiceServer,
|
||||
tracklist_service_server::TracklistServiceServer,
|
||||
},
|
||||
|
||||
@@ -3,7 +3,7 @@ use std::sync::Arc;
|
||||
use futures_util::FutureExt;
|
||||
use music_player_playback::player::Player;
|
||||
use music_player_server::{
|
||||
api::v1alpha1::{
|
||||
api::music::v1alpha1::{
|
||||
playback_service_server::PlaybackServiceServer,
|
||||
tracklist_service_server::TracklistServiceServer,
|
||||
},
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use music_player_server::{
|
||||
api::v1alpha1::{
|
||||
use music_player_server::api::{
|
||||
metadata::v1alpha1::Track,
|
||||
music::v1alpha1::{
|
||||
tracklist_service_client::TracklistServiceClient, AddTrackRequest, ClearTracklistRequest,
|
||||
GetTracklistTracksRequest, PlayTrackAtRequest, RemoveTrackRequest,
|
||||
},
|
||||
metadata::v1alpha1::Track,
|
||||
};
|
||||
use music_player_settings::{read_settings, Settings};
|
||||
use tonic::transport::Channel;
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//cargo:crates.bzl", "all_crate_deps")
|
||||
load("@crate_index//:defs.bzl", "aliases", "all_crate_deps")
|
||||
load("@rules_rust//rust:defs.bzl", "rust_library")
|
||||
|
||||
rust_library(
|
||||
name = "discovery_lib",
|
||||
name = "music_player_discovery",
|
||||
srcs = ["src/lib.rs"],
|
||||
deps = ["//settings:settings_lib"] + all_crate_deps(),
|
||||
deps = [
|
||||
"//settings:music_player_settings",
|
||||
"@crate_index//:env_logger",
|
||||
"@crate_index//:libmdns",
|
||||
"@crate_index//:mdns",
|
||||
"@crate_index//:mdns-sd",
|
||||
"@crate_index//:async-stream",
|
||||
"@crate_index//:futures-util",
|
||||
] + all_crate_deps(),
|
||||
)
|
||||
11
entity/BUILD
11
entity/BUILD
@@ -1,10 +1,10 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//cargo:crates.bzl", "all_crate_deps")
|
||||
load("@crate_index//:defs.bzl", "aliases", "all_crate_deps")
|
||||
load("@rules_rust//rust:defs.bzl", "rust_library")
|
||||
|
||||
rust_library(
|
||||
name = "entity_lib",
|
||||
name = "music_player_entity",
|
||||
srcs = [
|
||||
"src/addon.rs",
|
||||
"src/album.rs",
|
||||
@@ -16,5 +16,10 @@ rust_library(
|
||||
"src/playlist.rs",
|
||||
"src/track.rs",
|
||||
],
|
||||
deps = ["//types:types_lib"] + all_crate_deps(),
|
||||
deps = [
|
||||
"//types:music_player_types",
|
||||
"@crate_index//:serde",
|
||||
"@crate_index//:chrono",
|
||||
"@crate_index//:md5"
|
||||
] + all_crate_deps(),
|
||||
)
|
||||
@@ -1,10 +1,10 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//cargo:crates.bzl", "all_crate_deps")
|
||||
load("@crate_index//:defs.bzl", "aliases", "all_crate_deps")
|
||||
load("@rules_rust//rust:defs.bzl", "rust_library")
|
||||
|
||||
rust_library(
|
||||
name = "graphql_lib",
|
||||
name = "music_player_graphql",
|
||||
srcs = [
|
||||
"src/schema/objects/album.rs",
|
||||
"src/schema/objects/artist.rs",
|
||||
@@ -30,12 +30,20 @@ rust_library(
|
||||
"src/simple_broker.rs",
|
||||
],
|
||||
deps = [
|
||||
"//playback:playback_lib",
|
||||
"//scanner:scanner_lib",
|
||||
"//settings:settings_lib",
|
||||
"//storage:storage_lib",
|
||||
"//entity:entity_lib",
|
||||
"//tracklist:tracklist_lib",
|
||||
"//types:types_lib",
|
||||
"//playback:music_player_playback",
|
||||
"//scanner:music_player_scanner",
|
||||
"//settings:music_player_settings",
|
||||
"//storage:music_player_storage",
|
||||
"//entity:music_player_entity",
|
||||
"//tracklist:music_player_tracklist",
|
||||
"//types:music_player_types",
|
||||
"@crate_index//:async-graphql",
|
||||
"@crate_index//:rand",
|
||||
"@crate_index//:chrono",
|
||||
"@crate_index//:serde",
|
||||
"@crate_index//:cuid",
|
||||
"@crate_index//:slab",
|
||||
"@crate_index//:futures-util",
|
||||
"@crate_index//:once_cell",
|
||||
] + all_crate_deps(),
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//cargo:crates.bzl", "all_crate_deps")
|
||||
load("@crate_index//:defs.bzl", "aliases", "all_crate_deps")
|
||||
load("@rules_rust//rust:defs.bzl", "rust_library")
|
||||
|
||||
rust_library(
|
||||
name = "migration_lib",
|
||||
srcs = ["src/lib.rs"],
|
||||
deps = ["//settings:settings_lib"] + all_crate_deps(),
|
||||
name = "migration",
|
||||
srcs = [
|
||||
"src/lib.rs",
|
||||
"src/m20220101_000001_create_table.rs",
|
||||
"src/m20221115_220318_add_folder_table.rs",
|
||||
"src/m20221117_211308_add_created_at_column.rs",
|
||||
],
|
||||
deps = ["//settings:music_player_settings"] + all_crate_deps(),
|
||||
)
|
||||
@@ -1,10 +1,10 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//cargo:crates.bzl", "all_crate_deps")
|
||||
load("@crate_index//:defs.bzl", "aliases", "all_crate_deps")
|
||||
load("@rules_rust//rust:defs.bzl", "rust_library")
|
||||
|
||||
rust_library(
|
||||
name = "playback_lib",
|
||||
name = "music_player_playback",
|
||||
srcs = [
|
||||
"src/audio_backend/mod.rs",
|
||||
"src/audio_backend/rodio.rs",
|
||||
@@ -23,7 +23,21 @@ rust_library(
|
||||
"src/player.rs",
|
||||
],
|
||||
deps = [
|
||||
"//tracklist:tracklist_lib",
|
||||
"//entity:entity_lib",
|
||||
"//tracklist:music_player_tracklist",
|
||||
"//entity:music_player_entity",
|
||||
"@crate_index//:rand",
|
||||
"@crate_index//:rodio",
|
||||
"@crate_index//:log",
|
||||
"@crate_index//:thiserror",
|
||||
"@crate_index//:symphonia",
|
||||
"@crate_index//:futures-util",
|
||||
"@crate_index//:cpal",
|
||||
"@crate_index//:parking_lot",
|
||||
"@crate_index//:rand_distr",
|
||||
"@crate_index//:zerocopy",
|
||||
"@crate_index//:librespot-protocol",
|
||||
] + all_crate_deps(),
|
||||
)
|
||||
proc_macro_deps = [
|
||||
"@crate_index//:async-trait",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//cargo:crates.bzl", "all_crate_deps")
|
||||
load("@crate_index//:defs.bzl", "aliases", "all_crate_deps")
|
||||
load("@rules_rust//rust:defs.bzl", "rust_library")
|
||||
|
||||
rust_library(
|
||||
name = "scanner_lib",
|
||||
name = "music_player_scanner",
|
||||
srcs = ["src/lib.rs"],
|
||||
deps = [
|
||||
"//settings:settings_lib",
|
||||
"//entity:entity_lib",
|
||||
"//storage:storage_lib",
|
||||
"//types:types_lib",
|
||||
"//migration:migration_lib",
|
||||
"//settings:music_player_settings",
|
||||
"//entity:music_player_entity",
|
||||
"//storage:music_player_storage",
|
||||
"//types:music_player_types",
|
||||
"//migration:migration",
|
||||
"@crate_index//:walkdir",
|
||||
"@crate_index//:mime_guess",
|
||||
] + all_crate_deps(),
|
||||
)
|
||||
43
server/BUILD
43
server/BUILD
@@ -1,24 +1,14 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//cargo:crates.bzl", "all_crate_deps")
|
||||
load("@crate_index//:defs.bzl", "aliases", "all_crate_deps")
|
||||
load("@rules_rust//rust:defs.bzl", "rust_library")
|
||||
load("@rules_rust//cargo:defs.bzl", "cargo_build_script")
|
||||
|
||||
proto_library(
|
||||
name = "protos",
|
||||
srcs = ["proto/*/*/*.proto"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
cargo_build_script(
|
||||
name = "build_script",
|
||||
srcs = ["build.rs"],
|
||||
data = [":protos"],
|
||||
)
|
||||
|
||||
rust_library(
|
||||
name = "server_lib",
|
||||
name = "music_player_server",
|
||||
srcs = [
|
||||
"src/api/metadata.v1alpha1.rs",
|
||||
"src/api/music.v1alpha1.rs",
|
||||
"src/api/objects.v1alpha1.rs",
|
||||
"src/addons.rs",
|
||||
"src/history.rs",
|
||||
"src/playlist.rs",
|
||||
@@ -32,11 +22,22 @@ rust_library(
|
||||
"src/tracklist.rs"
|
||||
],
|
||||
deps = [
|
||||
"//playback:playback_lib",
|
||||
"//scanner:scanner_lib",
|
||||
"//settings:settings_lib",
|
||||
"//storage:storage_lib",
|
||||
"//entity:entity_lib",
|
||||
"//tracklist:tracklist_lib",
|
||||
"//playback:music_player_playback",
|
||||
"//scanner:music_player_scanner",
|
||||
"//settings:music_player_settings",
|
||||
"//storage:music_player_storage",
|
||||
"//entity:music_player_entity",
|
||||
"//tracklist:music_player_tracklist",
|
||||
"@crate_index//:tonic",
|
||||
"@crate_index//:tonic-web",
|
||||
"@crate_index//:futures-util",
|
||||
"@crate_index//:prost",
|
||||
"@crate_index//:serde",
|
||||
"@crate_index//:tokio-tungstenite",
|
||||
"@crate_index//:tungstenite",
|
||||
"@crate_index//:tokio",
|
||||
"@crate_index//:chrono",
|
||||
"@crate_index//:uuid",
|
||||
"@crate_index//:cuid",
|
||||
] + all_crate_deps(),
|
||||
)
|
||||
@@ -1,5 +1,5 @@
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
tonic_build::configure().compile(
|
||||
tonic_build::configure().out_dir("src/api").compile(
|
||||
&[
|
||||
"proto/metadata/v1alpha1/artist.proto",
|
||||
"proto/metadata/v1alpha1/album.proto",
|
||||
|
||||
@@ -3,11 +3,13 @@ use std::sync::Arc;
|
||||
use music_player_storage::Database;
|
||||
use tokio::sync::Mutex;
|
||||
|
||||
use crate::api::v1alpha1::{
|
||||
addons_service_server::AddonsService, GetAddonDetailsRequest, GetAddonDetailsResponse,
|
||||
GetAddonsRequest, GetAddonsResponse, SetAddonEnabledRequest, SetAddonEnabledResponse,
|
||||
use crate::api::music::v1alpha1::addons_service_server::AddonsService;
|
||||
use crate::api::music::v1alpha1::{
|
||||
GetAddonDetailsRequest, GetAddonDetailsResponse, GetAddonsRequest, GetAddonsResponse,
|
||||
SetAddonEnabledRequest, SetAddonEnabledResponse,
|
||||
};
|
||||
use crate::objects::v1alpha1::Addon;
|
||||
|
||||
use crate::api::objects::v1alpha1::Addon;
|
||||
|
||||
pub struct Addons {
|
||||
db: Arc<Mutex<Database>>,
|
||||
|
||||
116
server/src/api/metadata.v1alpha1.rs
Normal file
116
server/src/api/metadata.v1alpha1.rs
Normal file
@@ -0,0 +1,116 @@
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct SongArtist {
|
||||
#[prost(string, tag = "1")]
|
||||
pub id: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "2")]
|
||||
pub name: ::prost::alloc::string::String,
|
||||
}
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Song {
|
||||
#[prost(string, tag = "1")]
|
||||
pub id: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "2")]
|
||||
pub title: ::prost::alloc::string::String,
|
||||
#[prost(message, repeated, tag = "4")]
|
||||
pub artists: ::prost::alloc::vec::Vec<SongArtist>,
|
||||
#[prost(float, tag = "5")]
|
||||
pub duration: f32,
|
||||
#[prost(int32, tag = "6")]
|
||||
pub disc_number: i32,
|
||||
#[prost(int32, tag = "7")]
|
||||
pub track_number: i32,
|
||||
}
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Album {
|
||||
#[prost(string, tag = "1")]
|
||||
pub id: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "2")]
|
||||
pub title: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "3")]
|
||||
pub cover: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "4")]
|
||||
pub release_date: ::prost::alloc::string::String,
|
||||
#[prost(int32, tag = "5")]
|
||||
pub year: i32,
|
||||
#[prost(string, tag = "6")]
|
||||
pub artist: ::prost::alloc::string::String,
|
||||
#[prost(string, repeated, tag = "7")]
|
||||
pub genres: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
|
||||
#[prost(message, repeated, tag = "8")]
|
||||
pub tracks: ::prost::alloc::vec::Vec<Song>,
|
||||
}
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct ArtistSong {
|
||||
#[prost(string, tag = "1")]
|
||||
pub id: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "2")]
|
||||
pub title: ::prost::alloc::string::String,
|
||||
#[prost(message, repeated, tag = "4")]
|
||||
pub artists: ::prost::alloc::vec::Vec<Artist>,
|
||||
#[prost(float, tag = "5")]
|
||||
pub duration: f32,
|
||||
#[prost(int32, tag = "6")]
|
||||
pub disc_number: i32,
|
||||
#[prost(int32, tag = "7")]
|
||||
pub track_number: i32,
|
||||
#[prost(message, optional, tag = "8")]
|
||||
pub album: ::core::option::Option<Album>,
|
||||
}
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Artist {
|
||||
#[prost(string, tag = "1")]
|
||||
pub id: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "2")]
|
||||
pub name: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "3")]
|
||||
pub picture: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "4")]
|
||||
pub bio: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "5")]
|
||||
pub website: ::prost::alloc::string::String,
|
||||
#[prost(string, repeated, tag = "6")]
|
||||
pub genres: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
|
||||
#[prost(string, repeated, tag = "7")]
|
||||
pub images: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
|
||||
#[prost(message, repeated, tag = "8")]
|
||||
pub albums: ::prost::alloc::vec::Vec<Album>,
|
||||
#[prost(message, repeated, tag = "9")]
|
||||
pub songs: ::prost::alloc::vec::Vec<ArtistSong>,
|
||||
}
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Lyrics {
|
||||
#[prost(string, tag = "1")]
|
||||
pub id: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "2")]
|
||||
pub content: ::prost::alloc::string::String,
|
||||
}
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Track {
|
||||
#[prost(string, tag = "1")]
|
||||
pub id: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "2")]
|
||||
pub title: ::prost::alloc::string::String,
|
||||
#[prost(message, optional, tag = "3")]
|
||||
pub album: ::core::option::Option<Album>,
|
||||
#[prost(message, repeated, tag = "4")]
|
||||
pub artists: ::prost::alloc::vec::Vec<Artist>,
|
||||
#[prost(float, tag = "5")]
|
||||
pub duration: f32,
|
||||
#[prost(int32, tag = "6")]
|
||||
pub disc_number: i32,
|
||||
#[prost(int32, tag = "7")]
|
||||
pub track_number: i32,
|
||||
#[prost(message, optional, tag = "8")]
|
||||
pub lyrics: ::core::option::Option<Lyrics>,
|
||||
#[prost(string, tag = "9")]
|
||||
pub uri: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "10")]
|
||||
pub artist: ::prost::alloc::string::String,
|
||||
}
|
||||
5267
server/src/api/music.v1alpha1.rs
Normal file
5267
server/src/api/music.v1alpha1.rs
Normal file
File diff suppressed because it is too large
Load Diff
40
server/src/api/objects.v1alpha1.rs
Normal file
40
server/src/api/objects.v1alpha1.rs
Normal file
@@ -0,0 +1,40 @@
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Addon {
|
||||
#[prost(string, tag = "1")]
|
||||
pub id: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "2")]
|
||||
pub name: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "3")]
|
||||
pub description: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "4")]
|
||||
pub icon: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "5")]
|
||||
pub url: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "6")]
|
||||
pub version: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "7")]
|
||||
pub author: ::prost::alloc::string::String,
|
||||
#[prost(bool, tag = "8")]
|
||||
pub enabled: bool,
|
||||
}
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Playlist {
|
||||
#[prost(string, tag = "1")]
|
||||
pub id: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "2")]
|
||||
pub name: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "3")]
|
||||
pub description: ::prost::alloc::string::String,
|
||||
#[prost(message, repeated, tag = "4")]
|
||||
pub tracks: ::prost::alloc::vec::Vec<super::super::metadata::v1alpha1::Track>,
|
||||
}
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Tracklist {
|
||||
#[prost(string, tag = "1")]
|
||||
pub id: ::prost::alloc::string::String,
|
||||
#[prost(message, repeated, tag = "2")]
|
||||
pub tracks: ::prost::alloc::vec::Vec<super::super::metadata::v1alpha1::Track>,
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
use crate::api::v1alpha1::{
|
||||
use crate::api::music::v1alpha1::{
|
||||
core_service_server::CoreService, GetVersionRequest, GetVersionResponse,
|
||||
};
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ use std::sync::Arc;
|
||||
use music_player_storage::Database;
|
||||
use tokio::sync::Mutex;
|
||||
|
||||
use crate::api::v1alpha1::{
|
||||
use crate::api::music::v1alpha1::{
|
||||
history_service_server::HistoryService, GetHistoryRequest, GetHistoryResponse,
|
||||
};
|
||||
|
||||
|
||||
@@ -12,10 +12,14 @@ pub mod playlist;
|
||||
pub mod server;
|
||||
pub mod tracklist;
|
||||
pub mod api {
|
||||
pub mod v1alpha1 {
|
||||
#[path = ""]
|
||||
pub mod music {
|
||||
use music_player_entity::folder;
|
||||
|
||||
tonic::include_proto!("music.v1alpha1");
|
||||
use self::v1alpha1::GetFolderDetailsResponse;
|
||||
|
||||
#[path = "music.v1alpha1.rs"]
|
||||
pub mod v1alpha1;
|
||||
|
||||
impl From<folder::Model> for GetFolderDetailsResponse {
|
||||
fn from(model: folder::Model) -> Self {
|
||||
@@ -28,13 +32,14 @@ pub mod api {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub mod objects {
|
||||
pub mod v1alpha1 {
|
||||
#[path = ""]
|
||||
pub mod objects {
|
||||
use self::v1alpha1::Playlist;
|
||||
use music_player_entity::playlist;
|
||||
|
||||
tonic::include_proto!("objects.v1alpha1");
|
||||
#[path = "objects.v1alpha1.rs"]
|
||||
pub mod v1alpha1;
|
||||
|
||||
impl From<playlist::Model> for Playlist {
|
||||
fn from(model: playlist::Model) -> Self {
|
||||
@@ -48,13 +53,15 @@ pub mod objects {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub mod metadata {
|
||||
pub mod v1alpha1 {
|
||||
#[path = ""]
|
||||
pub mod metadata {
|
||||
use music_player_entity::{album, artist, track};
|
||||
|
||||
tonic::include_proto!("metadata.v1alpha1");
|
||||
use self::v1alpha1::{Album, Artist, ArtistSong, Song, SongArtist, Track};
|
||||
|
||||
#[path = "metadata.v1alpha1.rs"]
|
||||
pub mod v1alpha1;
|
||||
|
||||
impl From<artist::Model> for Artist {
|
||||
fn from(model: artist::Model) -> Self {
|
||||
|
||||
@@ -6,13 +6,13 @@ use sea_orm::{ActiveModelTrait, ColumnTrait, EntityTrait, ModelTrait, QueryFilte
|
||||
use std::sync::Arc;
|
||||
use tokio::sync::Mutex;
|
||||
|
||||
use crate::api::v1alpha1::{
|
||||
use crate::api::metadata::v1alpha1::{Album, Artist, ArtistSong, Song, SongArtist, Track};
|
||||
use crate::api::music::v1alpha1::{
|
||||
library_service_server::LibraryService, GetAlbumDetailsRequest, GetAlbumDetailsResponse,
|
||||
GetAlbumsRequest, GetAlbumsResponse, GetArtistDetailsRequest, GetArtistDetailsResponse,
|
||||
GetArtistsRequest, GetArtistsResponse, GetTrackDetailsRequest, GetTrackDetailsResponse,
|
||||
GetTracksRequest, GetTracksResponse, ScanRequest, ScanResponse, SearchRequest, SearchResponse,
|
||||
};
|
||||
use crate::metadata::v1alpha1::{Album, Artist, ArtistSong, Song, SongArtist, Track};
|
||||
|
||||
pub struct Library {
|
||||
db: Arc<Mutex<Database>>,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use crate::api::v1alpha1::{
|
||||
use crate::api::music::v1alpha1::{
|
||||
mixer_service_server::MixerService, GetMuteRequest, GetMuteResponse, GetVolumeRequest,
|
||||
GetVolumeResponse, SetMuteRequest, SetMuteResponse, SetVolumeRequest, SetVolumeResponse,
|
||||
};
|
||||
|
||||
@@ -3,15 +3,15 @@ use music_player_tracklist::Tracklist as TracklistState;
|
||||
use std::sync::Arc;
|
||||
use tokio::sync::mpsc::UnboundedSender;
|
||||
|
||||
use crate::{
|
||||
api::v1alpha1::{
|
||||
use crate::api::{
|
||||
metadata::v1alpha1::{Album, Artist, Track},
|
||||
music::v1alpha1::{
|
||||
playback_service_server::PlaybackService, GetCurrentlyPlayingSongRequest,
|
||||
GetCurrentlyPlayingSongResponse, GetPlaybackStateRequest, GetPlaybackStateResponse,
|
||||
GetTimePositionRequest, GetTimePositionResponse, NextRequest, NextResponse, PauseRequest,
|
||||
PauseResponse, PlayRequest, PlayResponse, PreviousRequest, PreviousResponse, SeekRequest,
|
||||
SeekResponse, StopRequest, StopResponse,
|
||||
},
|
||||
metadata::v1alpha1::{Album, Artist, Track},
|
||||
};
|
||||
|
||||
pub struct Playback {
|
||||
|
||||
@@ -7,8 +7,9 @@ use std::sync::Arc;
|
||||
use tokio::sync::Mutex;
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::{
|
||||
api::v1alpha1::{
|
||||
use crate::api::{
|
||||
metadata::v1alpha1::Track,
|
||||
music::v1alpha1::{
|
||||
playlist_service_server::PlaylistService, AddItemRequest, AddItemResponse,
|
||||
CreateFolderRequest, CreateFolderResponse, CreateRequest, CreateResponse,
|
||||
DeleteFolderRequest, DeleteFolderResponse, DeleteRequest, DeleteResponse,
|
||||
@@ -18,7 +19,6 @@ use crate::{
|
||||
RemoveItemResponse, RenameFolderRequest, RenameFolderResponse, RenameRequest,
|
||||
RenameResponse,
|
||||
},
|
||||
metadata::v1alpha1::Track,
|
||||
};
|
||||
|
||||
pub struct Playlist {
|
||||
|
||||
@@ -20,7 +20,7 @@ use crate::{
|
||||
playback::Playback, playlist::Playlist, tracklist::Tracklist,
|
||||
};
|
||||
|
||||
use crate::api::v1alpha1::{
|
||||
use crate::api::music::v1alpha1::{
|
||||
addons_service_server::AddonsServiceServer, core_service_server::CoreServiceServer,
|
||||
history_service_server::HistoryServiceServer, library_service_server::LibraryServiceServer,
|
||||
mixer_service_server::MixerServiceServer, playback_service_server::PlaybackServiceServer,
|
||||
|
||||
@@ -7,8 +7,9 @@ use music_player_tracklist::Tracklist as TracklistState;
|
||||
use sea_orm::EntityTrait;
|
||||
use tokio::sync::{mpsc::UnboundedSender, Mutex};
|
||||
|
||||
use crate::{
|
||||
api::v1alpha1::{
|
||||
use crate::api::{
|
||||
metadata::v1alpha1::Track,
|
||||
music::v1alpha1::{
|
||||
tracklist_service_server::TracklistService, AddTrackRequest, AddTrackResponse,
|
||||
AddTracksRequest, AddTracksResponse, ClearTracklistRequest, ClearTracklistResponse,
|
||||
FilterTracklistRequest, FilterTracklistResponse, GetNextTrackRequest, GetNextTrackResponse,
|
||||
@@ -18,7 +19,6 @@ use crate::{
|
||||
PlayTrackAtRequest, PlayTrackAtResponse, RemoveTrackRequest, RemoveTrackResponse,
|
||||
SetRepeatRequest, SetRepeatResponse, ShuffleRequest, ShuffleResponse,
|
||||
},
|
||||
metadata::v1alpha1::Track,
|
||||
};
|
||||
|
||||
pub struct Tracklist {
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//cargo:crates.bzl", "all_crate_deps")
|
||||
load("@crate_index//:defs.bzl", "aliases", "all_crate_deps")
|
||||
load("@rules_rust//rust:defs.bzl", "rust_library")
|
||||
|
||||
rust_library(
|
||||
name = "settings_lib",
|
||||
name = "music_player_settings",
|
||||
srcs = ["src/lib.rs"],
|
||||
deps = all_crate_deps(),
|
||||
deps = [
|
||||
"@crate_index//:config",
|
||||
"@crate_index//:uuid",
|
||||
"@crate_index//:toml",
|
||||
"@crate_index//:serde",
|
||||
"@crate_index//:dirs",
|
||||
"@crate_index//:md5",
|
||||
] + all_crate_deps(),
|
||||
)
|
||||
@@ -1,8 +1,8 @@
|
||||
use std::{sync::mpsc::Sender, time::Instant};
|
||||
|
||||
use music_player_server::{
|
||||
api::v1alpha1::GetCurrentlyPlayingSongResponse,
|
||||
use music_player_server::api::{
|
||||
metadata::v1alpha1::{Album, Artist, Track},
|
||||
music::v1alpha1::GetCurrentlyPlayingSongResponse,
|
||||
};
|
||||
use tui::layout::Rect;
|
||||
|
||||
|
||||
@@ -38,10 +38,7 @@ use music_player_playback::{
|
||||
player::{Player, PlayerEvent},
|
||||
};
|
||||
use music_player_server::event::{Event, TrackEvent};
|
||||
use music_player_server::{
|
||||
metadata::v1alpha1::{Album, Artist},
|
||||
server::MusicPlayerServer,
|
||||
};
|
||||
use music_player_server::server::MusicPlayerServer;
|
||||
use music_player_settings::{read_settings, Settings};
|
||||
use music_player_storage::Database;
|
||||
use music_player_tracklist::Tracklist;
|
||||
|
||||
@@ -2,7 +2,7 @@ use music_player_client::{
|
||||
library::LibraryClient, playback::PlaybackClient, tracklist::TracklistClient,
|
||||
ws_client::WebsocketClient,
|
||||
};
|
||||
use music_player_server::metadata::v1alpha1::{Album, Artist, Track};
|
||||
use music_player_server::api::metadata::v1alpha1::{Album, Track};
|
||||
use music_player_settings::{read_settings, Settings};
|
||||
use std::{sync::Arc, time::Instant};
|
||||
use tokio::sync::Mutex;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use music_player_server::metadata::v1alpha1::Artist;
|
||||
use music_player_server::api::metadata::v1alpha1::Artist;
|
||||
use tui::style::Style;
|
||||
|
||||
use crate::{app::App, user_config::Theme};
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//cargo:crates.bzl", "all_crate_deps")
|
||||
load("@crate_index//:defs.bzl", "aliases", "all_crate_deps")
|
||||
load("@rules_rust//rust:defs.bzl", "rust_library")
|
||||
|
||||
rust_library(
|
||||
name = "storage_lib",
|
||||
name = "music_player_storage",
|
||||
srcs = [
|
||||
"src/lib.rs",
|
||||
"src/searcher/album.rs",
|
||||
@@ -13,7 +13,9 @@ rust_library(
|
||||
"src/searcher/track.rs",
|
||||
],
|
||||
deps = [
|
||||
"//settings:settings_lib",
|
||||
"//types:types_lib",
|
||||
"//settings:music_player_settings",
|
||||
"//types:music_player_types",
|
||||
"@crate_index//:tantivy",
|
||||
"@crate_index//:itertools",
|
||||
] + all_crate_deps(),
|
||||
)
|
||||
@@ -1,10 +1,13 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//cargo:crates.bzl", "all_crate_deps")
|
||||
load("@crate_index//:defs.bzl", "aliases", "all_crate_deps")
|
||||
load("@rules_rust//rust:defs.bzl", "rust_library")
|
||||
|
||||
rust_library(
|
||||
name = "tracklist_lib",
|
||||
name = "music_player_tracklist",
|
||||
srcs = ["src/lib.rs"],
|
||||
deps = ["//entity:entity_lib"] + all_crate_deps(),
|
||||
deps = [
|
||||
"//entity:music_player_entity",
|
||||
"@crate_index//:rand"
|
||||
] + all_crate_deps(),
|
||||
)
|
||||
@@ -1,13 +1,15 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//cargo:crates.bzl", "all_crate_deps")
|
||||
load("@crate_index//:defs.bzl", "aliases", "all_crate_deps")
|
||||
load("@rules_rust//rust:defs.bzl", "rust_library")
|
||||
|
||||
rust_library(
|
||||
name = "types_lib",
|
||||
name = "music_player_types",
|
||||
srcs = [
|
||||
"src/lib.rs",
|
||||
"src/types.rs",
|
||||
],
|
||||
deps = all_crate_deps(),
|
||||
deps = [
|
||||
"@crate_index//:tantivy",
|
||||
] + all_crate_deps(),
|
||||
)
|
||||
28
webui/BUILD
28
webui/BUILD
@@ -1,18 +1,28 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//cargo:crates.bzl", "all_crate_deps")
|
||||
load("@crate_index//:defs.bzl", "aliases", "all_crate_deps")
|
||||
load("@rules_rust//rust:defs.bzl", "rust_library")
|
||||
|
||||
rust_library(
|
||||
name = "webui_lib",
|
||||
name = "music_player_webui",
|
||||
srcs = ["src/lib.rs"],
|
||||
data = [
|
||||
":musicplayer/build",
|
||||
],
|
||||
deps = [
|
||||
"//graphql:graphql_lib",
|
||||
"//settings:settings_lib",
|
||||
"//storage:storage_lib",
|
||||
"//playback:playback_lib",
|
||||
"//tracklist:tracklist_lib",
|
||||
"//entity:entity_lib",
|
||||
"//scanner:scanner_lib",
|
||||
"//graphql:music_player_graphql",
|
||||
"//settings:music_player_settings",
|
||||
"//storage:music_player_storage",
|
||||
"//playback:music_player_playback",
|
||||
"//tracklist:music_player_tracklist",
|
||||
"//entity:music_player_entity",
|
||||
"//scanner:music_player_scanner",
|
||||
"@crate_index//:actix-web",
|
||||
"@crate_index//:async-graphql",
|
||||
"@crate_index//:async-graphql-actix-web",
|
||||
"@crate_index//:mime_guess",
|
||||
"@crate_index//:rust-embed",
|
||||
"@crate_index//:actix-files",
|
||||
"@crate_index//:actix-cors",
|
||||
] + all_crate_deps(),
|
||||
)
|
||||
Reference in New Issue
Block a user