mssf_core/lib.rs
1// ------------------------------------------------------------
2// Copyright (c) Microsoft Corporation. All rights reserved.
3// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
4// ------------------------------------------------------------
5//! # Features
6//! All features are enabled by default unless otherwise noted.
7//! For most scenarios, you'll want the features. However, in some scenarios, such as:
8//! - integrating Rust into an existing Service Fabric Application written in another language
9//! - when you are using the lower-level COM API to do something more custom
10//! You might not need all of the functionality that the mssf-core crate provides
11//! In this case, you can configure only what you need to reduce dependencies and compile times.
12//!
13//! * ** config_source ** -
14//! Provides an implementation of config::Source. Requires config_rs crate
15//!
16//! * ** Tokio ** -
17//! A lot of the sophoisticated functionality in this crate requires Tokio.
18//! However, even without tokio, some of the higher level wrappers over COM types have utility.
19//!
20//! # SF COM API Versions
21//! The minimum supported SF version for mssf is 10.1. mssf can be used on newer versions of SF,
22//! but some APIs are not available.
23
24// lib that contains all common extensions for the raw fabric apis.
25
26// SF lib entrypoint apis.
27pub mod api;
28pub use api::API_TABLE;
29pub mod client;
30#[cfg(feature = "config_source")]
31pub mod conf;
32pub mod debug;
33mod error;
34pub use error::{Error, ErrorCode, Result};
35pub mod iter;
36pub mod mem;
37pub mod runtime;
38pub mod strings;
39pub mod sync;
40pub mod types;
41
42// Rename the mssf_pal dependency
43// This is needed because windows_core macro looks for the `windows_core` token.
44extern crate mssf_pal as windows_core;
45// re-export some windows types
46pub use windows_core::{GUID, HRESULT, Interface, PCWSTR, Ref, WString};
47// Note cannot re-export windows_core::implement because the macro using it has hard coded mod name.
48/// Windows error type.
49pub use windows_core::Error as WinError;
50pub use windows_core::Result as WinResult;
51
52/// Re-export async_trait for use in defining async traits in mssf-core
53pub use async_trait::async_trait;