use-svelte 0.0.1

Svelte and SvelteKit metadata primitives for RustUse
Documentation
  • Coverage
  • 39.02%
    16 out of 41 items documented1 out of 16 items with examples
  • Size
  • Source code size: 15.59 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 917.61 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 5s Average build duration of successful builds.
  • all releases: 5s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-js
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-svelte

Svelte and SvelteKit metadata primitives for RustUse.

Experimental

use-svelte is experimental while use-js remains below 0.3.0.

Example

use use_svelte::{SvelteComponentName, SvelteDirectiveName, SvelteKitRenderingMode};

let component = SvelteComponentName::new("AppShell")?;
let directive = SvelteDirectiveName::new("on:click")?;

assert_eq!(component.as_str(), "AppShell");
assert_eq!(directive.as_str(), "on:click");
assert_eq!(SvelteKitRenderingMode::Ssr.as_str(), "ssr");
# Ok::<(), use_svelte::SvelteNameError>(())

Scope

  • Svelte file-kind labels plus SvelteKit directory, rendering, and config labels.
  • Lightweight component and directive name validation.

Non-goals

  • Svelte compilation.
  • Stores, routing, or template parsing.
  • Runtime behavior.

License

Licensed under either Apache-2.0 or MIT.