Crates.io | firebase-js-sys |
lib.rs | firebase-js-sys |
version | 0.1.0 |
source | src |
created_at | 2023-04-25 07:25:46.395297 |
updated_at | 2023-04-25 07:25:46.395297 |
description | `wasm32-unknown-unknown` bindings for the Firebase modular JS SDK (`npm` firebase@9) |
homepage | |
repository | https://github.com/ActuallyHappening/rust-firebase-js/tree/master/firebase-js-sys |
max_upload_size | |
id | 848274 |
size | 2,195,111 |
Raw wrappers around the firebase
npm package for Rust
consumption.
Delicious!
See the firebase-js
package
for a high level implementation layer ontop of this crate, which is probably what you want rather
than having to manually deal with each JsValue
.
APIs are exposed in a similar structure to the firebase
npm package,
using module names like app
and database
.
Access them like so:
use firebase_js_sys::app;
Inside each module is a ModuleXXX
struct, which contains the raw JS bindings
generated by wasm-bindgen
use firebase_js_sys::app::ModuleApp;
ModuleApp::initializeApp(JsValue::UNDEFINED);
npm
package versionTo change the version of the firebase
npm package, you need to update the
package.json
file in the firebase-js-sys
directory.
Then, run pnpm install
, and pnpm run js
which watches the files in js/*
(or simply rollup -c
to build once rather than watching).
Then you can run cargo build
to build the Rust library, or better
pnpm run serve
(or just trunk serve
) to run the main.rs
binary.