{"id":58983,"library":"sp-weights","title":"SP Weights","description":"Types and traits for interfacing between the host and the wasm runtime in Substrate.","status":"active","version":"34.0.0","language":"rust","source_language":null,"source_url":"https://github.com/paritytech/polkadot-sdk","tags":["substrate","polkadot","weights","runtime","wasm"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\nsp-weights = \"34.0.0\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add sp-weights","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"Weight","correct":"use sp_weights::Weight;"}],"quickstart":{"code":"use sp_weights::Weight;\n\nfn main() {\n    let weight = Weight::from_parts(1000, 0);\n    println!(\"Weight: {:?}\", weight);\n}","lang":"rust","description":"Creates a `Weight` instance representing computation and storage costs."},"warnings":[{"fix":"Check the changelog for migration details.","message":"Breaking changes in version 34.0.0: `Weight` fields may have been restructured.","severity":"breaking","affected_versions":">=34.0.0"}],"env_vars":null,"search_vec":"'host':10 'interfac':7 'polkadot':18 'runtim':14,20 'sp':1 'substrat':16,17 'trait':5 'type':3 'wasm':13,21 'weight':2,19","created_at":"2026-06-16T16:46:08.889871+00:00","updated_at":"2026-06-16T16:46:08.889871+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://paritytech.github.io/polkadot-sdk/","github":"https://github.com/paritytech/polkadot-sdk","docs":"https://docs.rs/sp-weights/","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}}