Skip to main content

Module resource_catalog

Module resource_catalog 

Source
Expand description

Resource Catalog — canonical types, Quin encoding, and CapabilityProfile binding.

This module defines the authoritative Rust types for the YAML-backed resource catalog (resources/*.yaml). It is the single source of truth — the Flutter bridge and CLI both reference these types, not their own copies.

§Quin encoding

Each catalog entry can be encoded as a set of NQuins for first-class graph membership. Predicate convention:

Predicate stringMeaning
llm:hasFormatModel file format (e.g. gguf)
llm:hasQuantizationQuantization level
llm:hasSizeMbFile size (inline integer)
llm:hasRamEstimateMbPeak RAM needed (inline int)
llm:hasSourceRepoSource repo hash
llm:hasLicenseLicense identifier hash
ont:hasFormatOntology serialisation format
ont:hasDomainDomain tag hash
prov:wasGeneratedByProvenance: download event
prov:atPathLocal file path hash
prov:atTimestampUnix timestamp (inline int)

Structs§

DownloadInfo
Where and how to fetch a resource.
ExampleQuery
LLMResource
A downloadable LLM / model package (primarily GGUF).
OntologyResource
A downloadable ontology (OWL, SKOS, RDF/Turtle, etc.).
ResourceCatalog
The complete in-memory resource catalog, loaded from resources/*.yaml.
SPARQLResource
A public SPARQL endpoint.

Enums§

CatalogError
Errors loading resources/*.yaml.

Functions§

load_default
Load from resolve_resources_dir().
load_from_dir
Load the full catalog from dir/catalog.yaml and referenced child YAML files.
resolve_resources_dir
Resolve the resources directory for desktop / dev builds.