Skip to content

Commit

Permalink
chore: breaking change notice (#1772)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed May 11, 2021
1 parent 21ce355 commit 1df16b7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
11 changes: 11 additions & 0 deletions core/tauri-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ mod command;
#[macro_use]
mod context;

/// Mark a function as a command handler. It creates a wrapper function with the necessary glue code.
///
/// # Stability
/// The output of this macro is managed internally by Tauri,
/// and should not be accessed directly on normal applications.
/// It may have breaking changes in the future.
#[proc_macro_attribute]
pub fn command(attributes: TokenStream, item: TokenStream) -> TokenStream {
command::wrapper(attributes, item)
Expand All @@ -23,6 +29,11 @@ pub fn generate_handler(item: TokenStream) -> TokenStream {
}

/// Reads a Tauri config file and generates a `::tauri::Context` based on the content.
///
/// # Stability
/// The output of this macro is managed internally by Tauri,
/// and should not be accessed directly on normal applications.
/// It may have breaking changes in the future.
#[proc_macro]
pub fn generate_context(items: TokenStream) -> TokenStream {
// this macro is exported from the context module
Expand Down
7 changes: 5 additions & 2 deletions core/tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ macro_rules! tauri_build_context {
}

/// User supplied data required inside of a Tauri application.
///
/// # Stability
/// This is the output of the `tauri::generate_context!` macro, and is not considered part of the stable API.
/// Unless you know what you are doing and are prepared for this type to have breaking changes, do not create it yourself.
pub struct Context<A: Assets> {
/// The config the application was prepared with.
pub config: Config,
Expand All @@ -145,9 +149,8 @@ pub struct Context<A: Assets> {
pub package_info: crate::api::PackageInfo,
}

// TODO: expand these docs
/// Manages a running application.
///
/// TODO: expand these docs
pub trait Manager<P: Params>: sealed::ManagerBase<P> {
/// The [`Config`] the manager was created with.
fn config(&self) -> Arc<Config> {
Expand Down
7 changes: 0 additions & 7 deletions core/tauri/src/updater/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
// SPDX-License-Identifier: MIT

//! # Tauri Updater
//! ---
//! > ⚠️ This project is a working project. Expect breaking changes.
//! ---
//!
//! The updater is focused on making Tauri's application updates **as safe and transparent as updates to a website**.
//!
Expand Down Expand Up @@ -101,7 +98,6 @@
//! Event : `tauri://update`
//!
//! ### Rust
//! todo: update this example to compile and run
//! ```ignore
//! dispatcher.emit("tauri://update", None);
//! ```
Expand All @@ -124,7 +120,6 @@
//! ```
//!
//! ### Rust
//! todo: update this example to compile and run
//! ```ignore
//! dispatcher.listen("tauri://update-available", move |msg| {
//! println("New version available: {:?}", msg);
Expand All @@ -146,7 +141,6 @@
//! Event : `tauri://update-install`
//!
//! ### Rust
//! todo: update this example to compile and run
//! ```ignore
//! dispatcher.emit("tauri://update-install", None);
//! ```
Expand All @@ -172,7 +166,6 @@
//! ERROR is emitted when there is an error with the updater. We suggest to listen to this event even if the dialog is enabled.
//!
//! ### Rust
//! todo: update this example to compile and run
//! ```ignore
//! dispatcher.listen("tauri://update-status", move |msg| {
//! println("New status: {:?}", msg);
Expand Down
3 changes: 1 addition & 2 deletions core/tauri/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,11 @@ impl Monitor {
}
}

// TODO: expand these docs since this is a pretty important type
/// A webview window managed by Tauri.
///
/// This type also implements [`Manager`] which allows you to manage other windows attached to
/// the same application.
///
/// TODO: expand these docs since this is a pretty important type
pub struct Window<P: Params> {
/// The webview window created by the runtime.
window: DetachedWindow<P>,
Expand Down

0 comments on commit 1df16b7

Please sign in to comment.