日志记录

wasm_bindgen_webidl crate(由 web-sysbuild.rs 使用)使用 env_logger 进行日志记录,可以通过在构建 web-sys crate 时设置 RUST_LOG=wasm_bindgen_webidl 环境变量来启用。

请确保在 cargo build 期间启用“非常详细”的输出,以便在 web-sys 的构建脚本输出中看到这些日志。

cd crates/web-sys
RUST_LOG=wasm_bindgen_webidl cargo build -vv

如果 wasm_bindgen_webidl 遇到它不知道如何转换为 wasm-bindgen AST 项的 WebIDL 构造,它将发出警告级别的日志。

WARN 2018-07-06T18:21:49Z: wasm_bindgen_webidl: Unsupported WebIDL interface: ...