Keep adding irrelevant stuff
This commit is contained in:
65
Cargo.lock
generated
65
Cargo.lock
generated
@@ -469,13 +469,39 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"coreaudio-rs",
|
||||
"env_logger",
|
||||
"jack",
|
||||
"lib",
|
||||
"log",
|
||||
"prost",
|
||||
"tokio",
|
||||
"tonic",
|
||||
"tonic-prost",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "env_filter"
|
||||
version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1bf3c259d255ca70051b30e2e95b5446cdb8949ac4cd22c0d7fd634d89f568e2"
|
||||
dependencies = [
|
||||
"log",
|
||||
"regex",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "env_logger"
|
||||
version = "0.11.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f"
|
||||
dependencies = [
|
||||
"anstream",
|
||||
"anstyle",
|
||||
"env_filter",
|
||||
"jiff",
|
||||
"log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "equivalent"
|
||||
version = "1.0.2"
|
||||
@@ -827,6 +853,30 @@ dependencies = [
|
||||
"pkg-config",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jiff"
|
||||
version = "0.2.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "49cce2b81f2098e7e3efc35bc2e0a6b7abec9d34128283d7a26fa8f32a6dbb35"
|
||||
dependencies = [
|
||||
"jiff-static",
|
||||
"log",
|
||||
"portable-atomic",
|
||||
"portable-atomic-util",
|
||||
"serde_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jiff-static"
|
||||
version = "0.2.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "980af8b43c3ad5d8d349ace167ec8170839f753a42d233ba19e08afe1850fa69"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "js-sys"
|
||||
version = "0.3.82"
|
||||
@@ -1142,6 +1192,21 @@ version = "0.3.32"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c"
|
||||
|
||||
[[package]]
|
||||
name = "portable-atomic"
|
||||
version = "1.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"
|
||||
|
||||
[[package]]
|
||||
name = "portable-atomic-util"
|
||||
version = "0.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507"
|
||||
dependencies = [
|
||||
"portable-atomic",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "prettyplease"
|
||||
version = "0.2.37"
|
||||
|
||||
@@ -6,10 +6,13 @@ edition = "2024"
|
||||
[dependencies]
|
||||
clap = { version = "4.5.53", features = ["derive"] }
|
||||
coreaudio-rs = { version = "0.13.0", optional = true }
|
||||
env_logger = "0.11.8"
|
||||
jack = {version = "0.13.3", optional = true }
|
||||
lib = { path = "../lib/" }
|
||||
log = "0.4.28"
|
||||
prost = "0.14.1"
|
||||
tokio = { version = "1.48.0", features = ["rt-multi-thread"] }
|
||||
tonic = "0.14.2"
|
||||
tonic-prost = "0.14.2"
|
||||
|
||||
[features]
|
||||
|
||||
@@ -1,24 +1,43 @@
|
||||
mod audio_engine;
|
||||
use clap::Parser;
|
||||
use lib::termix::audio_backend::audio_backend_server;
|
||||
|
||||
use lib::termix::audio_backend::audio_backend_server::{AudioBackend, AudioBackendServer};
|
||||
use tonic::{transport::Server, Request, Response, Status};
|
||||
use log::{debug, error, log_enabled, info, Level};
|
||||
/// Simple program to greet a person
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(version, about, long_about = None)]
|
||||
struct Args {
|
||||
/// Name of the person to greet
|
||||
#[arg(short, long)]
|
||||
name: String,
|
||||
|
||||
/// Number of times to greet
|
||||
#[arg(short, long, default_value_t = 1)]
|
||||
count: u8,
|
||||
#[arg(long, default_value_t = 50051)]
|
||||
grpc_port: i32,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
#[derive(Debug, Default)]
|
||||
pub struct TermixAudioBackend {}
|
||||
|
||||
#[tonic::async_trait]
|
||||
impl AudioBackend for TermixAudioBackend {
|
||||
async fn start_client(&self,request:tonic::Request<()>,) -> std::result::Result<tonic::Response<()>,tonic::Status> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
async fn init_connection(&self,request:tonic::Request<()>,) -> std::result::Result<tonic::Response<()>,tonic::Status> {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
env_logger::init();
|
||||
let args = Args::parse();
|
||||
info!("starting the grpc server on port {:?}", args.grpc_port);
|
||||
|
||||
for _ in 0..args.count {
|
||||
println!("Hello {}!", args.name);
|
||||
}
|
||||
let addr = "[::1]:50051".parse()?;
|
||||
let greeter = TermixAudioBackend::default();
|
||||
|
||||
Server::builder()
|
||||
.add_service(AudioBackendServer::new(greeter))
|
||||
.serve(addr)
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
use std::{fs, io::Result};
|
||||
use tonic_prost_build;
|
||||
use std::io::Result;
|
||||
|
||||
fn main() -> Result<()> {
|
||||
//let proto_dir = "proto";
|
||||
|
||||
@@ -8,16 +8,7 @@ service AudioBackend {
|
||||
rpc InitConnection(google.protobuf.Empty) returns (google.protobuf.Empty);
|
||||
}
|
||||
|
||||
message Shirt {
|
||||
// Label sizes
|
||||
enum Size {
|
||||
SMALL = 0;
|
||||
MEDIUM = 1;
|
||||
LARGE = 2;
|
||||
}
|
||||
|
||||
// The base color
|
||||
string color = 1;
|
||||
// The size as stated on the label
|
||||
Size size = 2;
|
||||
message Shirt {
|
||||
google.protobuf.Empty dummy = 1;
|
||||
}
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package snazzy.items;
|
||||
|
||||
// A snazzy new shirt!
|
||||
message Shirt {
|
||||
// Label sizes
|
||||
enum Size {
|
||||
SMALL = 0;
|
||||
MEDIUM = 1;
|
||||
LARGE = 2;
|
||||
}
|
||||
|
||||
// The base color
|
||||
string color = 1;
|
||||
// The size as stated on the label
|
||||
Size size = 2;
|
||||
}
|
||||
Reference in New Issue
Block a user