Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a default-enabled feature gate for agents and services #684

Merged
merged 6 commits into from
Nov 11, 2019
Merged
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
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ trybuild = "1.0"
rustversion = "0.1"

[features]
default = []
default = ["services", "agent"]
doc_test = []
web_test = []
wasm_test = []
services = []
agent = []
yaml = ["serde_yaml"]
msgpack = ["rmp-serde"]
cbor = ["serde_cbor"]
Expand Down
9 changes: 7 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,20 @@ pub mod macros {
pub use yew_macro::Properties;
}

pub mod agent;
pub mod app;
pub mod callback;
pub mod components;
pub mod format;
pub mod html;
pub mod scheduler;
pub mod services;
pub mod utils;
pub mod virtual_dom;

#[cfg(feature = "agent")]
pub mod agent;
#[cfg(feature = "services")]
pub mod services;

/// The module that contains all events available in the framework.
pub mod events {
pub use crate::html::{ChangeData, InputData};
Expand Down Expand Up @@ -142,6 +145,7 @@ where
/// use yew::prelude::*;
/// ```
pub mod prelude {
#[cfg(feature = "agent")]
pub use crate::agent::{Bridge, Bridged, Threaded};
pub use crate::app::App;
pub use crate::callback::Callback;
Expand All @@ -154,6 +158,7 @@ pub mod prelude {
pub use crate::virtual_dom::Classes;

/// Prelude module for creating worker.
#[cfg(feature = "agent")]
pub mod worker {
pub use crate::agent::{
Agent, AgentLink, Bridge, Bridged, Context, Global, HandlerId, Job, Private, Public,
Expand Down