AppFlowy/rust-lib/flowy-sdk/src/lib.rs

16 lines
381 B
Rust
Raw Normal View History

2021-06-30 15:11:27 +00:00
pub mod module;
pub use module::*;
2021-07-08 13:23:44 +00:00
use flowy_dispatch::prelude::*;
2021-06-30 15:11:27 +00:00
use module::build_modules;
2021-06-28 15:58:43 +00:00
pub struct FlowySDK {}
impl FlowySDK {
2021-07-03 06:14:10 +00:00
pub fn init_log(directory: &str) { flowy_log::init_log("flowy", directory, "Debug").unwrap(); }
2021-06-28 15:58:43 +00:00
2021-07-02 12:47:52 +00:00
pub fn init(path: &str) {
tracing::trace!("🔥 Root path: {}", path);
2021-07-02 12:47:52 +00:00
EventDispatch::construct(|| build_modules());
2021-06-30 15:11:27 +00:00
}
2021-06-28 15:58:43 +00:00
}