Compare commits

...

5 Commits

Author SHA1 Message Date
f1375f5639 Update icarus_models (#15)
Some checks failed
Release Tagging / release (push) Successful in 25s
Rust Build / Check (push) Failing after 24s
Rust Build / Check (pull_request) Failing after 21s
Rust Build / Test Suite (push) Failing after 22s
Rust Build / Rustfmt (push) Successful in 21s
Rust Build / Clippy (push) Failing after 24s
Rust Build / build (push) Failing after 24s
Rust Build / Test Suite (pull_request) Failing after 24s
Rust Build / Rustfmt (pull_request) Successful in 22s
Rust Build / Clippy (pull_request) Failing after 25s
Rust Build / build (pull_request) Failing after 22s
Reviewed-on: #15
Co-authored-by: kdeng00 <kundeng00@pm.me>
Co-committed-by: kdeng00 <kundeng00@pm.me>
2025-05-28 23:44:20 +00:00
b41933e05e Stamped rust version (#14)
Some checks failed
Release Tagging / release (push) Successful in 27s
Rust Build / Check (push) Failing after 25s
Rust Build / Check (pull_request) Failing after 24s
Rust Build / Test Suite (push) Failing after 23s
Rust Build / Rustfmt (push) Successful in 22s
Rust Build / Clippy (push) Failing after 24s
Rust Build / build (push) Failing after 26s
Rust Build / Test Suite (pull_request) Failing after 25s
Rust Build / Rustfmt (pull_request) Successful in 20s
Rust Build / Clippy (pull_request) Failing after 24s
Rust Build / build (pull_request) Failing after 23s
Reviewed-on: #14
Co-authored-by: kdeng00 <kundeng00@pm.me>
Co-committed-by: kdeng00 <kundeng00@pm.me>
2025-05-28 23:28:28 +00:00
d1610d1331 service (#11)
All checks were successful
Release Tagging / release (push) Successful in 43s
Rust Build / Check (pull_request) Successful in 36s
Rust Build / Check (push) Successful in 44s
Rust Build / Test Suite (push) Successful in 40s
Rust Build / Rustfmt (push) Successful in 34s
Rust Build / Clippy (push) Successful in 37s
Rust Build / build (push) Successful in 1m11s
Rust Build / Test Suite (pull_request) Successful in 37s
Rust Build / Rustfmt (pull_request) Successful in 30s
Rust Build / Clippy (pull_request) Successful in 36s
Rust Build / build (pull_request) Successful in 38s
Reviewed-on: #11
Co-authored-by: phoenix <kundeng94@gmail.com>
Co-committed-by: phoenix <kundeng94@gmail.com>
2025-04-12 17:28:03 +00:00
8bc49e781b Correcting action workflow (#12)
All checks were successful
Release Tagging / release (push) Successful in 37s
Rust Build / Check (push) Successful in 32s
Rust Build / Test Suite (push) Successful in 34s
Rust Build / Rustfmt (push) Successful in 29s
Rust Build / Clippy (push) Successful in 31s
Rust Build / build (push) Successful in 34s
Rust Build / Check (pull_request) Successful in 34s
Rust Build / Test Suite (pull_request) Successful in 43s
Rust Build / Rustfmt (pull_request) Successful in 31s
Rust Build / Clippy (pull_request) Successful in 41s
Rust Build / build (pull_request) Successful in 40s
Reviewed-on: #12
Co-authored-by: phoenix <kundeng94@gmail.com>
Co-committed-by: phoenix <kundeng94@gmail.com>
2025-04-05 22:00:41 +00:00
f68d01d50f Workflow changes (#9)
All checks were successful
Rust Build / Check (pull_request) Successful in 28s
Rust Build / Clippy (push) Successful in 34s
Rust Build / build (push) Successful in 31s
Rust Build / Test Suite (pull_request) Successful in 28s
Rust Build / Rustfmt (pull_request) Successful in 27s
Rust Build / Clippy (pull_request) Successful in 30s
Rust Build / build (pull_request) Successful in 30s
Release Tagging / release (push) Successful in 36s
Rust Build / Check (push) Successful in 30s
Rust Build / Test Suite (push) Successful in 30s
Rust Build / Rustfmt (push) Successful in 26s
Reviewed-on: #9
Co-authored-by: phoenix <kundeng94@gmail.com>
Co-committed-by: phoenix <kundeng94@gmail.com>
2025-04-05 21:26:05 +00:00
3 changed files with 41 additions and 6 deletions

View File

@@ -5,8 +5,6 @@ on:
branches:
- main
- devel
tags:
- 'v*' # Trigger on tags matching v*
jobs:
release:
@@ -20,7 +18,7 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.85.0
toolchain: 1.86.0
components: cargo
- name: Extract Version from Cargo.toml

View File

@@ -2,6 +2,8 @@
name = "songparser"
version = "0.1.0"
edition = "2024"
rust-version = "1.86"
[dependencies]
icarus_models = { git = "ssh://git@git.kundeng.us/phoenix/icarus_models.git", tag = "v0.2.0" }
tokio = { version = "1.44.1", features = ["full"] }
icarus_models = { git = "ssh://git@git.kundeng.us/phoenix/icarus_models.git", tag = "v0.4.3" }

View File

@@ -1,3 +1,38 @@
fn main() {
println!("Hello, world!");
use std::error::Error;
use tokio::io::AsyncReadExt;
use tokio::net::{TcpListener, TcpStream};
use tokio::spawn;
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
let listener = TcpListener::bind("127.0.0.1:8080").await?;
println!("API calling service listening on 127.0.0.1:8080");
loop {
let (stream, addr) = listener.accept().await?;
println!("Accepted connection from: {}", addr);
spawn(async move {
if let Err(e) = handle_connection(stream).await {
eprintln!("Error handling connection from {}: {}", addr, e);
}
});
}
}
async fn handle_connection(mut stream: TcpStream) -> Result<(), Box<dyn Error + Send + Sync>> {
let mut buffer = [0; 1024];
loop {
let n = stream.read(&mut buffer).await?;
if n == 0 {
break; // Connection closed
}
let request_data = String::from_utf8_lossy(&buffer[..n]).trim().to_string();
println!("Received request: {}", request_data);
}
Ok(())
}