{"id":57171,"library":"js-sys","title":"js-sys","description":"Bindings for all JS global objects and functions in all JS environments like Node.js and browsers, built on `#[wasm_bindgen]` using the `wasm-bindgen` crate.","status":"active","version":"0.3.102","language":"rust","source_language":null,"source_url":"https://github.com/wasm-bindgen/wasm-bindgen","tags":["wasm","javascript","bindings","webassembly","browser"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\njs-sys = \"0.3.102\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add js-sys","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"console","correct":"use js_sys::console;"}],"quickstart":{"code":"use js_sys::console;\n\nfn main() {\n    console::log_1(&\"Hello from Rust!\".into());\n}","lang":"rust","description":"Log a message to the browser console using js-sys."},"warnings":[{"fix":"Compile with --target wasm32-unknown-unknown and use wasm-bindgen to generate JS glue","message":"Requires wasm32 target and wasm-bindgen runtime","severity":"gotcha","affected_versions":">=0.2.0"}],"env_vars":null,"search_vec":"'bind':4,32 'bindgen':23,28 'browser':19,34 'built':20 'crate':29 'environ':15 'function':11 'global':8 'javascript':31 'js':2,7,14 'js-sys':1 'like':16 'node.js':17 'object':9 'sys':3 'use':24 'wasm':22,27,30 'wasm-bindgen':26 'webassembl':33","created_at":"2026-06-16T15:31:25.894223+00:00","updated_at":"2026-06-16T15:31:25.894223+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://wasm-bindgen.github.io/wasm-bindgen/","github":"https://github.com/wasm-bindgen/wasm-bindgen","docs":"https://docs.rs/js-sys/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["other"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-16","next_check":"2026-12-13","install_tag":null}}