diff --git a/Cargo.toml b/Cargo.toml index 1790ea6..c8f5e44 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,17 +37,18 @@ tinybrowser = { path = "crates/tinybrowser" } # TinyBus defines the message types, interface macro, and frozen module ABI # used by the generated integration. Socket and CLI features are unnecessary # here. -tinybus = { path = "vendor/tinybus/crates/tinybus", version = "0.1.0", default-features = false, features = [ +tinybus = { version = "=0.1.2", default-features = false, features = [ "macros", "modules", ] } # The module-side SDK owns the isolated runtime and exports the ABI entrypoints # required by TinyBus's dynamic loader. -tinybus-module = { path = "vendor/tinybus/crates/tinybus-module", version = "0.1.0" } +tinybus-module = "=0.1.2" + # Jev makes bounded, typed decisions for the agentic browser-control loop. It is # pinned by the `vendor/tinyjevclient` gitlink so its wire behavior is reviewed # together with each update. -tinyjevclient = { path = "vendor/tinyjevclient/crates/tinyjevclient" } +tinyjevclient = "=0.2.1" # Derive macros for the crate-wide error type in `crates/template/src/error/`. # Every dependency entry should carry a comment like this one saying why it is # here. @@ -95,3 +96,8 @@ private_intra_doc_links = "warn" lto = "thin" codegen-units = 1 strip = "debuginfo" + +[patch.crates-io] +tinybus = { path = "vendor/tinybus/crates/tinybus" } +tinybus-module = { path = "vendor/tinybus/crates/tinybus-module" } +tinyjevclient = { path = "vendor/tinyjevclient/crates/tinyjevclient" } diff --git a/crates/tinybrowser/Cargo.toml b/crates/tinybrowser/Cargo.toml index f9150ac..90e5d33 100644 --- a/crates/tinybrowser/Cargo.toml +++ b/crates/tinybrowser/Cargo.toml @@ -71,6 +71,8 @@ futures-util = { version = "0.3", default-features = false, features = ["sink", [features] default = [] +linked = ["static-link"] +static-link = [] [lints] workspace = true diff --git a/crates/tinybrowser/src/lib.rs b/crates/tinybrowser/src/lib.rs index 6872139..8415d64 100644 --- a/crates/tinybrowser/src/lib.rs +++ b/crates/tinybrowser/src/lib.rs @@ -103,6 +103,10 @@ mod snapshot; pub mod tinybus_module; +/// Constructs this module for registration with an in-process TinyBus host. +#[cfg(feature = "static-link")] +pub use tinybus_module::exports::linked_module; + pub use engine::Browser; pub use error::{Error, Result}; diff --git a/crates/tinybrowser/src/tinybus_module/mod.rs b/crates/tinybrowser/src/tinybus_module/mod.rs index 2aeb17c..a55c682 100644 --- a/crates/tinybrowser/src/tinybus_module/mod.rs +++ b/crates/tinybrowser/src/tinybus_module/mod.rs @@ -199,8 +199,8 @@ async fn setup(connection: Connection) -> BusResult<()> { unreachable_pub, reason = "generated C ABI symbols are documented by the TinyBus module SDK" )] -mod exports { - tinybus_module::module_export! { +pub(crate) mod exports { + tinybus_module::module_export_optional_static! { setup = super::setup, // Two threads: one to serve calls, one so a long navigation does not // block the call that would close the session it is stuck in. diff --git a/vendor/tinybus b/vendor/tinybus index 6ee8258..433d9ed 160000 --- a/vendor/tinybus +++ b/vendor/tinybus @@ -1 +1 @@ -Subproject commit 6ee8258c03eb442aca8225d328d3c8e7c5489af6 +Subproject commit 433d9ed088597d21c48706e397b149fff04855cd