Riven/riven/srcgen/lib.rs.dt
Mingwei Samuel 1d6b513aa7 feat: setup riven for wasm (nodejs) execution (#63)
+ use custom `Notify`
+ use different version of async sleep (tokio vs gloo-timers)
+ switch futures utils from `tokio` to `futures`
2024-02-24 21:42:06 -08:00

55 lines
998 B
Text

{{
const dotUtils = require('./dotUtils.js');
const readme = require('fs').readFileSync('../../README.md', 'utf-8').split(/\r?\n/);
}}{{= dotUtils.preamble() }}
#![forbid(unsafe_code)]
#![deny(missing_docs)]
{{~ readme :line }}
//!{{= line ? (' ' + line) : '' }}
{{~}}
// Re-exported reqwest types.
pub use reqwest;
mod config;
pub use config::RiotApiConfig;
pub mod consts;
#[rustfmt::skip]
pub mod endpoints;
mod error;
pub use error::*;
pub mod meta;
#[rustfmt::skip]
pub mod models;
mod models_impls;
mod req;
mod response_info;
pub use response_info::*;
mod riot_api;
pub use riot_api::*;
mod util;
/// Wasm compatibility layer for [`std::time`] or [`web_time`].
#[rustfmt::skip]
pub mod time {
#[cfg(not(target_family = "wasm"))]
pub use std::time::*;
#[cfg(target_family = "wasm")]
pub use web_time::*;
#[cfg(not(target_family = "wasm"))]
pub use tokio::time::sleep;
#[cfg(target_family = "wasm")]
pub use gloo_timers::future::sleep;
}