| Crates.io | platter2 |
| lib.rs | platter2 |
| version | 0.1.6 |
| created_at | 2022-08-05 20:52:28.148658+00 |
| updated_at | 2022-08-05 21:17:14.36696+00 |
| description | Load files on web and desktop asynchronously |
| homepage | |
| repository | https://github.com/Nazariglez/platter2 |
| max_upload_size | |
| id | 639552 |
| size | 11,569 |
This is a fork of platter with some upgrades and fixes.
Thanks, @ryanisaacg, for your hard work.
--
A simple utility to serve you files on a platter
platter2 works on both desktop and web, and returns a byte buffer of the file's contents.
On desktop, load_file is backed by native file system APIs. On web, it is backed by an
HTTP 'GET' request.
let file_contents = load_file("path_to_my_file").await?;
To use platter2 on the web, enable either the web-sys feature (for wasm-pack and wasm-bindgen workflows) or the stdweb feature (for stdweb and cargo-web workflows).