This commit is contained in:
2026-08-12 14:11:47 -04:00
parent 79894f654d
commit f852da4f4e
48 changed files with 4379 additions and 779 deletions
+38
View File
@@ -0,0 +1,38 @@
use tonic::transport::Server;
use tracing_subscriber::{fmt, EnvFilter};
use tracing_subscriber::fmt::format::FmtSpan;
use tracing_subscriber::layer::SubscriberExt;
use tracing_subscriber::util::SubscriberInitExt;
use gl_inference::proto::ontology_server::OntologyServer;
use crate::service::OntologyService;
mod service;
mod logic;
mod error;
#[tokio::main]
async fn main() -> color_eyre::Result<()> {
let appender = tracing_appender::rolling::never("/tmp", "inference");
tracing_subscriber::registry()
.with(
fmt::layer()
.with_span_events(FmtSpan::CLOSE)
.with_writer(appender),
)
.with(EnvFilter::from_default_env())
.init();
color_eyre::install()?;
let ontology_service = OntologyService::new();
let server = OntologyServer::new(ontology_service);
let addr = String::from("[::1]:3000");
println!("Inference engine listening on: {addr}");
Server::builder()
.add_service(server)
.serve(addr.parse().unwrap())
.await?;
Ok(())
}