svelte-store

Crates.iosvelte-store
lib.rssvelte-store
version0.1.3
sourcesrc
created_at2022-08-01 16:02:51.093498
updated_at2022-08-28 00:06:43.279121
descriptionErgonomic Rust wrapper for using Svelte stores through WASM.
homepagehttps://github.com/jquesada2016/svelte-store-wasm
repositoryhttps://github.com/jquesada2016/svelte-store-wasm
max_upload_size
id636914
size13,306
(jquesada2016)

documentation

https://docs.rs/svelte-store-wasm

README

svelte-store

Svelte Store Bindings

This crate is intended to make working with svelte stores easy and ergonomic. Specifically, the goal is to allow easier use of Rust as the backend of a svelte app where the UI can directly react to changes that happen with the Rust-WASM world.

This crate exposes one struct, mainly [Readable], which allows seemless management of readable Svelte stores in JS. Despite it's name, [Readable] can be written to from Rust, but only yields a Readable store to JS, making sure that mutation can only happen within Rust's safety guarantees.

These stores can additionally be annotated with Typescript types to provide better safety from the JS side. To see how, check out the [Readable::get_store] example. (Note: [Readable::get_store] fn and example is only available on wasm32 targets)

License: MIT

Commit count: 13

cargo fmt