add epoxy info function

This commit is contained in:
Toshit Chawda 2024-08-08 13:01:39 -07:00
parent 569789c2a0
commit 72d43508d0
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
5 changed files with 19 additions and 4 deletions

View file

@ -43,6 +43,20 @@ mod utils;
mod websocket;
mod ws_wrapper;
#[wasm_bindgen]
pub fn info() -> Object {
let obj = Object::new();
object_set(&obj, "version", env!("CARGO_PKG_VERSION").into());
cfg_if! {
if #[cfg(feature = "full")] {
object_set(&obj, "minimal", false.into());
} else {
object_set(&obj, "minimal", true.into());
}
};
obj
}
type HttpBody = http_body_util::Full<Bytes>;
#[derive(Debug, Error)]