feat: Note that duckdb RAG driver is unavailable on MUSL Linux builds when initializing a RAG so users know when using the binary, not just based on docs

This commit is contained in:
2026-08-28 22:35:39 -06:00
parent 65e6249adb
commit 0946e3ec64
+25 -19
View File
@@ -1869,30 +1869,36 @@ fn select_embedding_model(models: &[&Model]) -> Result<String> {
} }
pub(crate) fn select_rag_driver() -> Result<String> { pub(crate) fn select_rag_driver() -> Result<String> {
// Statically linked musl builds cannot dlopen DuckDB extensions, so duckdb is not offered there.
#[cfg(target_env = "musl")] #[cfg(target_env = "musl")]
let options = vec![ {
"yaml — portable, in-memory HNSW; usable from several Coyote processes at once (default)",
];
#[cfg(not(target_env = "musl"))]
let options = vec![
"yaml — portable, in-memory HNSW; usable from several Coyote processes at once (default)",
"duckdb — persistent on-disk store; vectors and content survive restarts; HNSW approximate search.",
];
let sel = Select::new("RAG storage driver:", options)
.with_starting_cursor(0)
.prompt()?;
if sel.starts_with("duckdb") {
println!( println!(
"Note: several Coyote processes can query a duckdb RAG at the same time, \ "Note: the duckdb RAG driver is only available in GNU builds of coyote \
but while one process is ingesting or rebuilding it the others cannot \ (musl builds are statically linked and cannot load DuckDB extensions). \
read it until that finishes. Changing its driver later means deleting \ Using the yaml driver."
and recreating the RAG."
); );
Ok("duckdb".to_string())
} else {
Ok("yaml".to_string()) Ok("yaml".to_string())
} }
#[cfg(not(target_env = "musl"))]
{
let options = vec![
"yaml — portable, in-memory HNSW; usable from several Coyote processes at once (default)",
"duckdb — persistent on-disk store; vectors and content survive restarts; HNSW approximate search.",
];
let sel = Select::new("RAG storage driver:", options)
.with_starting_cursor(0)
.prompt()?;
if sel.starts_with("duckdb") {
println!(
"Note: several Coyote processes can query a duckdb RAG at the same time, \
but while one process is ingesting or rebuilding it the others cannot \
read it until that finishes. Changing its driver later means deleting \
and recreating the RAG."
);
Ok("duckdb".to_string())
} else {
Ok("yaml".to_string())
}
}
} }
const EXTRACTOR_SKIP: &str = "Skip"; const EXTRACTOR_SKIP: &str = "Skip";