{"id":57908,"library":"core-graphics","title":"Core Graphics","description":"Rust bindings to Apple's Core Graphics framework for macOS.","status":"active","version":"0.25.0","language":"rust","source_language":null,"source_url":"https://github.com/servo/core-foundation-rs","tags":["macos","graphics","core-graphics","2d"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\ncore-graphics = \"0.25.0\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add core-graphics","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"CGContext","correct":"use core_graphics::context::CGContext;"}],"quickstart":{"code":"use core_graphics::context::CGContext;\n\nfn main() {\n    // Example: create a bitmap context\n    let width = 100;\n    let height = 100;\n    let ctx = CGContext::create_bitmap_context(\n        None,\n        width,\n        height,\n        8,\n        0,\n        &core_graphics::color_space::CGColorSpace::create_device_rgb(),\n        core_graphics::base::kCGImageAlphaPremultipliedFirst,\n    );\n    println!(\"Created CGContext: {:?}\", ctx);\n}","lang":"rust","description":"Create a bitmap graphics context."},"warnings":[{"fix":"Use conditional compilation with #[cfg(target_os = \"macos\")].","message":"Only available on macOS (requires Core Graphics framework).","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'2d':18 'appl':6 'bind':4 'core':1,8,16 'core-graph':15 'framework':10 'graphic':2,9,14,17 'maco':12,13 'rust':3","created_at":"2026-06-16T16:04:19.994351+00:00","updated_at":"2026-06-16T16:04:19.994351+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://github.com/servo/core-foundation-rs","github":"https://github.com/servo/core-foundation-rs","docs":"https://docs.rs/core-graphics/","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}}