first commit

This commit is contained in:
2026-03-24 13:42:13 +00:00
commit ce951d2e10
101 changed files with 3146 additions and 0 deletions
@@ -0,0 +1,10 @@
[package]
name = "prometeu-language-api"
version = "0.1.0"
edition = "2021"
license = "MIT"
description = "Canonical language contract for Prometeu Backend: identifiers, references, and strict Frontend trait."
repository = "https://github.com/prometeu/runtime"
[dependencies]
@@ -0,0 +1,21 @@
#[derive(Debug, Clone)]
pub struct SourcePolicy {
pub extensions: Vec<&'static str>,
pub case_sensitive: bool,
}
impl SourcePolicy {
pub fn matches_ext(&self, ext: &str) -> bool {
if self.case_sensitive {
self.extensions.iter().any(|e| *e == ext)
} else {
self.extensions.iter().any(|e| e.eq_ignore_ascii_case(ext))
}
}
}
#[derive(Debug, Clone)]
pub struct LanguageSpec {
pub id: &'static str,
pub source_policy: SourcePolicy,
}
@@ -0,0 +1,3 @@
mod language_spec;
pub use language_spec::*;