1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! Rust parts of the tiny wasm libc — only what musl C cannot provide on
//! bare-metal wasm32 (allocator, signals, basisu's itoa).
//!
//! The string/ctype/math/stdlib/multibyte functions and the atexit
//! registry are compiled from the vendored musl sources instead (see
//! `wasm_libc.rs`), mirroring how sqlite-wasm-rs builds its libc shim.
//!
//! This file is Copyright (c) Jonathan 'theJPster' Pallant 2019
//! Licensed under the Blue Oak Model License 1.0.0
//!
//! See each module for its respective license.
// On native test builds nothing references these functions: they are only
// used via the `no_mangle` forwards in `export.rs`, which is
// wasm32-unknown-unknown-only (compiled on wasm, not on native test).
// On wasm there is no dead code, so `expect` must not apply there (it
// would warn about an unfulfilled expectation).
// No `expect(clippy::missing_safety_doc)` here: `wasm_ffi` is a private
// module (`mod wasm_ffi;` in lib.rs), so none of these functions are
// exported from the crate and that lint never fires on them, on any
// target. The crate-visible safety contract lives on the `no_mangle`
// forwards in `export.rs` instead.
// The re-exports are consumed by `export.rs`, which is compiled only for
// bare-metal wasm targets; on native test builds they would be unused
// imports (the functions stay alive via the `expect(dead_code)` above).
pub use ;
pub use ;