Skip to main content

Crate tauri_plugin_compmd

Crate tauri_plugin_compmd 

Source
Expand description

tauri-plugin-compmd: CompMD’s sandbox frames for a Tauri app, served from a scheme of the app’s own (docs/tauri-plugin.md).

The sandbox (@compmd/sandbox) runs a document’s components in frames, which need an origin apart from the app’s page. The plugin brings the frames, serves them on a scheme of their own, and tells the page where they are. An app adds it in one call:

let app = tauri::Builder::<tauri::Wry>::default().plugin(tauri_plugin_compmd::init());
// then, as every Tauri app: app.run(tauri::generate_context!())

and its page opens a sandbox with no base, which the plugin gave it:

const view = createSandbox({ page: "host" }).open(container, { components: processed.hostComponents });

Builder customizes it: another scheme’s name, or the app’s own build of the frames.

Structs§

Build
A build of the frames: its hash, which its paths name, and its files.
Builder
The plugin, set up by further calls.
Frames
The build the app serves, or none when there is none.
Served
The frames the app serves, and the scheme they are served on, as the app’s state.

Enums§

Files
A build’s files.

Constants§

FRAMES_JSON
The file beside the builds that names the current one, as buildHashedFrames writes it.
SCHEME
The scheme’s name when the app gives none, the one the embedded frames are built for.

Traits§

CompmdExt
What the plugin gives Rust code of the app.

Functions§

init
The plugin as it comes: the embedded frames on the scheme compmd, their base given to the app’s pages.