Crates.io | platter |
lib.rs | platter |
version | 0.1.4 |
source | src |
created_at | 2019-10-17 00:44:05.577973 |
updated_at | 2019-12-22 19:04:07.434466 |
description | Load files on web and desktop asynchronously |
homepage | |
repository | https://github.com/ryanisaacg/platter |
max_upload_size | |
id | 173197 |
size | 11,337 |
A simple utility to serve you files on a platter
platter
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 platter
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).