Skip to main content

Module deep_link

Module deep_link 

Source
Expand description

Deep links / URL schemes: validation, a queue that waits for the frontend, and registration.

Base: CodeRight deep_link (strict parse, control-character and traversal rejection, queue until the renderer is ready). Generalised from two fixed coderight:// shapes to any registered scheme; the unknown-origin consent decision table stays app-specific. Fixed a donor bug: percent-decoding now decodes UTF-8 bytes, not bytes-as-chars.

Delivery paths: macOS RunEvent::Opened; Windows/Linux the argv of the launch (first launch or forwarded by crate::instance).

Structs§

DeepLink
DeepLinkQueue
Links wait here until the frontend reports ready, then drain in arrival order.

Functions§

parse
Parse <scheme>://<host>/<seg>/<seg>?k=v#frag. Only schemes are accepted; control characters, ../. segments, empty hosts and over-long input are rejected.
register_scheme
Register scheme for the current user, pointing at executable (Windows: HKCU registry; macOS registers through the bundle’s CFBundleURLTypes, Linux through a .desktop MIME entry installed by the packager, so both return Ok(false) here).