Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions crates/tinymemory-module/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions crates/tinymemory-module/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ publish = false
# without going through the loader; the `cdylib` is what a release ships.
crate-type = ["rlib", "cdylib"]

[features]
static-link = []

[dependencies]
# The contract. Every type crossing the bus is one of these, and all of them
# already carry serde impls — which is why this module needs no `wire` module of
Expand Down Expand Up @@ -55,14 +58,14 @@ tinycortex = { version = "0.1", features = ["contacts"] }
# Provider-neutral chat request and response types carried over TinyBus.
tinyinference-llm = "0.3"
# TinyBus provides the typed service interface and the dynamic module host ABI.
# Reached by path now that this crate is its own workspace root: the nested
# checkout's `[workspace.package]` resolves correctly from here.
tinybus = { version = "0.1.0", path = "../../vendor/tinybus/crates/tinybus", default-features = false, features = [
# The registry identity lets an embedding host use its own TinyBus patch;
# standalone builds use this workspace's local patch below.
tinybus = { version = "=0.1.2", default-features = false, features = [
"macros",
"modules",
] }
# The module-side SDK owns its runtime and exports the stable C entrypoints.
tinybus-module = { version = "0.1.0", path = "../../vendor/tinybus/crates/tinybus-module" }
tinybus-module = "=0.1.2"
# `EmbeddingProvider::embed` is an `async fn` on an object-safe trait.
async-trait = "0.1"
# `EmbeddingProvider::embed` is anyhow-typed.
Expand Down Expand Up @@ -117,6 +120,9 @@ tinyinference-embeddings = { path = "../../vendor/tinyinference/crates/tinyinfer
tinyinference-llm = { path = "../../vendor/tinyinference/crates/tinyinference-llm" }

[patch.crates-io]
tinybus = { path = "../../vendor/tinybus/crates/tinybus" }
tinybus-module = { path = "../../vendor/tinybus/crates/tinybus-module" }
tinybus-macros = { path = "../../vendor/tinybus/crates/tinybus-macros" }
tinycortex = { path = "../../vendor/tinycortex" }
tinycortex-api = { path = "../../vendor/tinycortex/api" }
tinyinference-core = { path = "../../vendor/tinyinference/crates/tinyinference-core" }
Expand Down
5 changes: 4 additions & 1 deletion crates/tinymemory-module/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ fn setup_error(message: impl Into<String>) -> BusError {
reason = "generated C ABI symbols are documented by the TinyBus module SDK"
)]
mod exports {
tinybus_module::module_export! {
tinybus_module::module_export_optional_static! {
setup = super::setup,
config = super::ModuleConfig,
// Eight, derived rather than picked. Two are the floor this module has
Expand Down Expand Up @@ -731,3 +731,6 @@ mod exports {
lazy = false,
}
}

#[cfg(feature = "static-link")]
pub use exports::linked_module;