new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Tauri · Plugins and security · all subjects

localhost

8 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

localhost plugin purpose

The localhost plugin exposes an app's assets through a localhost server instead of using the default custom protocol.

localhost plugin security warning

The localhost plugin brings considerable security risks and should only be used if you know what you are doing. The default custom protocol implementation should be preferred if in doubt.

localhost plugin automatic setup command

Use the package manager to install the localhost plugin automatically with one of the following commands: 'npm run tauri add localhost', 'yarn run tauri add localhost', 'pnpm tauri add localhost', 'deno task tauri add localhost', 'bun tauri add localhost', or 'cargo tauri add localhost'.

localhost plugin manual setup with Cargo

To manually add the localhost plugin, run 'cargo add tauri-plugin-localhost' in the src-tauri folder to add the dependency to Cargo.toml.

localhost plugin initialization in lib.rs

Initialize the localhost plugin in lib.rs by calling .plugin(tauri_plugin_localhost::Builder::new().build()) on the tauri::Builder.

localhost plugin usage example in Rust

Example of using the localhost plugin in Rust: specify a port number (e.g., u16 = 9527), then initialize the plugin with tauri_plugin_localhost::Builder::new(port).build() in the tauri::Builder. In the setup callback, create a URL like 'http://localhost:{port}' and pass it to WebviewWindowBuilder::new() with WebviewUrl::External(url).

localhost plugin port configuration

The localhost plugin accepts a port number as a parameter to the Builder. For example, tauri_plugin_localhost::Builder::new(port) where port is a u16 value.

localhost plugin Rust-only availability

The localhost plugin is available in Rust only.

Give your agent this brain