firebase-js-sys

Crates.iofirebase-js-sys
lib.rsfirebase-js-sys
version0.1.0
sourcesrc
created_at2023-04-25 07:25:46.395297
updated_at2023-04-25 07:25:46.395297
description`wasm32-unknown-unknown` bindings for the Firebase modular JS SDK (`npm` firebase@9)
homepage
repositoryhttps://github.com/ActuallyHappening/rust-firebase-js/tree/master/firebase-js-sys
max_upload_size
id848274
size2,195,111
Caleb Yates (ActuallyHappening)

documentation

README

Firebase JS SYS

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

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);

Internals: Changing npm package version

To 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.

Commit count: 0

cargo fmt