[{"data":1,"prerenderedAt":1150},["ShallowReactive",2],{"navigation":3,"\u002Fdocs\u002Fnative":135,"\u002Fdocs\u002Fnative-surround":1145},[4],{"title":5,"path":6,"stem":7,"children":8,"page":134},"Docs","\u002Fdocs","docs",[9,13,17,21,25,29,33,37,41,45,49,53,57,61,70,74,78,82,86,90,94,98,102,106,110,114,118,122,126,130],{"title":10,"path":11,"stem":12},"AI harnesses: LLM tools, MCP servers and agents","\u002Fdocs\u002Fai-tools","docs\u002Fai-tools",{"title":14,"path":15,"stem":16},"Architecture","\u002Fdocs\u002Farchitecture","docs\u002Farchitecture",{"title":18,"path":19,"stem":20},"Web \u002F native bridges","\u002Fdocs\u002Fbridges","docs\u002Fbridges",{"title":22,"path":23,"stem":24},"Broadcast channels and tests","\u002Fdocs\u002Fchannels-and-tests","docs\u002Fchannels-and-tests",{"title":26,"path":27,"stem":28},"CLI reference","\u002Fdocs\u002Fcli","docs\u002Fcli",{"title":30,"path":31,"stem":32},"Completeness: how far an answer reaches","\u002Fdocs\u002Fcompleteness","docs\u002Fcompleteness",{"title":34,"path":35,"stem":36},"Configuration","\u002Fdocs\u002Fconfiguration","docs\u002Fconfiguration",{"title":38,"path":39,"stem":40},"External systems","\u002Fdocs\u002Fexternal","docs\u002Fexternal",{"title":42,"path":43,"stem":44},"Generated, copied and vendored files","\u002Fdocs\u002Fgenerated","docs\u002Fgenerated",{"title":46,"path":47,"stem":48},"Installing and updating cg","\u002Fdocs\u002Finstall","docs\u002Finstall",{"title":50,"path":51,"stem":52},"Java","\u002Fdocs\u002Fjava","docs\u002Fjava",{"title":54,"path":55,"stem":56},"Kotlin","\u002Fdocs\u002Fkotlin","docs\u002Fkotlin",{"title":58,"path":59,"stem":60},"Known limitations","\u002Fdocs\u002Flimitations","docs\u002Flimitations",{"title":62,"path":63,"stem":64,"children":65},"MCP server","\u002Fdocs\u002Fmcp","docs\u002Fmcp",[66],{"title":67,"path":68,"stem":69},"code-graph MCP: sample outputs (real calls via the MCP Python SDK stdio client)","\u002Fdocs\u002Fmcp\u002Fsample_outputs","docs\u002Fmcp\u002Fsample_outputs",{"title":71,"path":72,"stem":73},"Rust, C and C++","\u002Fdocs\u002Fnative","docs\u002Fnative",{"title":75,"path":76,"stem":77},"Port gaps: cg parity","\u002Fdocs\u002Fparity","docs\u002Fparity",{"title":79,"path":80,"stem":81},"PHP","\u002Fdocs\u002Fphp","docs\u002Fphp",{"title":83,"path":84,"stem":85},"Planned changes","\u002Fdocs\u002Fplans","docs\u002Fplans",{"title":87,"path":88,"stem":89},"Platform-specific code","\u002Fdocs\u002Fplatforms","docs\u002Fplatforms",{"title":91,"path":92,"stem":93},"Protocol links","\u002Fdocs\u002Fprotocols","docs\u002Fprotocols",{"title":95,"path":96,"stem":97},"Python","\u002Fdocs\u002Fpython","docs\u002Fpython",{"title":99,"path":100,"stem":101},"Quick start","\u002Fdocs\u002Fquickstart","docs\u002Fquickstart",{"title":103,"path":104,"stem":105},"Graph schema","\u002Fdocs\u002Fschema","docs\u002Fschema",{"title":107,"path":108,"stem":109},"Attack surface","\u002Fdocs\u002Fsurface","docs\u002Fsurface",{"title":111,"path":112,"stem":113},"Swift","\u002Fdocs\u002Fswift","docs\u002Fswift",{"title":115,"path":116,"stem":117},"TypeScript \u002F JavaScript frameworks","\u002Fdocs\u002Fts-frameworks","docs\u002Fts-frameworks",{"title":119,"path":120,"stem":121},"How we validate","\u002Fdocs\u002Fvalidation","docs\u002Fvalidation",{"title":123,"path":124,"stem":125},"Validation log","\u002Fdocs\u002Fvalidation-log","docs\u002Fvalidation-log",{"title":127,"path":128,"stem":129},"Value facts and resolutions","\u002Fdocs\u002Fvalue-facts","docs\u002Fvalue-facts",{"title":131,"path":132,"stem":133},"Visual view","\u002Fdocs\u002Fviz","docs\u002Fviz",false,{"id":136,"title":71,"body":137,"description":1139,"extension":1140,"meta":1141,"navigation":1142,"path":72,"seo":1143,"stem":73,"__hash__":1144},"docs\u002Fdocs\u002Fnative.md",{"type":138,"value":139,"toc":1129},"minimark",[140,166,171,243,266,269,294,372,447,457,461,674,678,705,784,821,825],[141,142,143,144,148,149,153,154,156,157,161,162,165],"p",{},"What Rust, C, and C++ add beyond ",[145,146,147],"a",{"href":47},"Install",", ",[145,150,152],{"href":151},"\u002Fdocs\u002Fcli#query-targets-specs","CLI specs",", and ",[145,155,103],{"href":104},": heuristic vs rust-analyzer \u002F scip-clang, the indexer flags, and the ids those pages do not spell out. Toolchain fit: ",[158,159,160],"code",{},"cg doctor -h",". Why a file stayed heuristic: ",[158,163,164],{},"cg coverage",".",[167,168,170],"h2",{"id":169},"modes","Modes",[172,173,174,190],"table",{},[175,176,177],"thead",{},[178,179,180,184,187],"tr",{},[181,182,183],"th",{},"mode",[181,185,186],{},"calls",[181,188,189],{},"needs",[191,192,193,217],"tbody",{},[178,194,195,199,204],{},[196,197,198],"td",{},"heuristic",[196,200,201,202],{},"name resolution, labelled ",[158,203,198],{},[196,205,206,207,148,210,148,213,216],{},"tree-sitter (",[158,208,209],{},"tree-sitter-rust",[158,211,212],{},"tree-sitter-c",[158,214,215],{},"tree-sitter-cpp",")",[178,218,219,222,232],{},[196,220,221],{},"exact",[196,223,224,225,227,228,231],{},"compiler-resolved references (",[158,226,221],{},", or ",[158,229,230],{},"resolved"," through a receiver, a macro, or dispatch). Node ids stay the syntax layer's",[196,233,234,235,238,239,216],{},"Rust: rust-analyzer. C\u002FC++: scip-clang plus ",[158,236,237],{},"compile_commands.json"," (",[145,240,242],{"href":241},"#exact-mode","Exact mode",[141,244,245,246,249,250,253,254,257,258,261,262,165],{},"The syntax layer also records facts the compiler index does not: crates and modules, entry points, the ",[158,247,248],{},"pub"," surface, ",[158,251,252],{},"#[cfg]"," \u002F ",[158,255,256],{},"#if"," gates, env reads, ",[158,259,260],{},"unsafe",", FFI, and routes. Kind names: ",[145,263,265],{"href":264},"\u002Fdocs\u002Fschema#node-kinds","node kinds",[167,267,242],{"id":268},"exact-mode",[141,270,271,272,275,276,279,280,238,282,285,286,238,289,293],{},"Exact mode runs when the indexer is installed. ",[158,273,274],{},"CG_RUST_SCIP=0"," or ",[158,277,278],{},"CG_C_SCIP=0"," forces the heuristic layer. A failed run is named by ",[158,281,164],{},[158,283,284],{},"exact indexer run failed",") and the index stays on the syntax layer. SCIP output is cached under ",[158,287,288],{},"~\u002F.cache\u002Fcg\u002Fscip\u002F",[145,290,292],{"href":291},"\u002Fdocs\u002Fcli#clean","clean",").",[172,295,296,306],{},[175,297,298],{},[178,299,300,303],{},[181,301,302],{},"indexer",[181,304,305],{},"how",[191,307,308,332,359],{},[178,309,310,315],{},[196,311,312],{},[158,313,314],{},"rust-analyzer scip",[196,316,317,318,238,321,324,325,328,329],{},"a root ",[158,319,320],{},"Cargo.toml",[158,322,323],{},"cargo metadata",", or the manifests if cargo is missing). Build scripts and proc-macros stay off unless ",[158,326,327],{},"CG_RUST_BUILD_SCRIPTS=1",". Cargo features are ",[158,330,331],{},"all",[178,333,334,339],{},[196,335,336],{},[158,337,338],{},"scip-clang",[196,340,341,342,344,345,148,348,148,351,354,355,358],{},"a ",[158,343,237],{}," at the root, under ",[158,346,347],{},"build*\u002F",[158,349,350],{},"out\u002F",[158,352,353],{},"cmake-build-*\u002F",", or at ",[158,356,357],{},"CG_COMPDB",". One database is one configuration",[178,360,361,364],{},[196,362,363],{},"prebuilt index",[196,365,366,275,369],{},[158,367,368],{},"CG_RUST_SCIP_FILE",[158,370,371],{},"CG_C_SCIP_FILE",[172,373,374,384],{},[175,375,376],{},[178,377,378,381],{},[181,379,380],{},"still heuristic",[181,382,383],{},"why",[191,385,386,397,416,439],{},[178,387,388,394],{},[196,389,390,391],{},"indexer missing or ",[158,392,393],{},"*_SCIP=0",[196,395,396],{},"coverage says so",[178,398,399,402],{},[196,400,401],{},"C\u002FC++ with no compile database",[196,403,404,405,408,409,412,413,216],{},"stats ",[158,406,407],{},"\"mode\": \"heuristic\"",". The database comes from the build system (CMake ",[158,410,411],{},"CMAKE_EXPORT_COMPILE_COMMANDS",", Meson, ",[158,414,415],{},"bear",[178,417,418,425],{},[196,419,420,421,253,423],{},"inactive ",[158,422,252],{},[158,424,256],{},[196,426,427,428,431,432,435,436],{},"the syntax node stays. Rust re-runs rust-analyzer for other targets the ",[158,429,430],{},"cfg","s name (",[158,433,434],{},"attrs.exact_target","); the rest is ",[158,437,438],{},"via: cfg-inactive",[178,440,441,444],{},[196,442,443],{},"files the index omits",[196,445,446],{},"those files keep heuristic edges",[141,448,449,452,453,456],{},[158,450,451],{},"CG_CFAMILY=1"," forces the C\u002FC++ plugin and ",[158,454,455],{},"=0"," turns it off. It steps aside in a Cargo, npm, Composer, Go, Python, or Dart repo unless a compile database exists. Generated headers come from the configure step; unity sources listed but not on disk are skipped.",[167,458,460],{"id":459},"environment-variables","Environment variables",[172,462,463,473],{},[175,464,465],{},[178,466,467,470],{},[181,468,469],{},"variable",[181,471,472],{},"effect",[191,474,475,486,509,523,532,564,575,588,598,614,627,641,651,661],{},[178,476,477,483],{},[196,478,479,148,481],{},[158,480,274],{},[158,482,278],{},[196,484,485],{},"force heuristic mode",[178,487,488,496],{},[196,489,490,148,493],{},[158,491,492],{},"CG_RUST_ANALYZER",[158,494,495],{},"CG_SCIP_CLANG",[196,497,498,499,502,503,275,506,216],{},"indexer binary (",[158,500,501],{},"PATH",", then ",[158,504,505],{},"~\u002F.cargo\u002Fbin",[158,507,508],{},"~\u002F.local\u002Fbin",[178,510,511,517],{},[196,512,513,148,515],{},[158,514,368],{},[158,516,371],{},[196,518,519,520],{},"an existing ",[158,521,522],{},"index.scip",[178,524,525,529],{},[196,526,527],{},[158,528,327],{},[196,530,531],{},"let rust-analyzer run build scripts and proc-macros",[178,533,534,539],{},[196,535,536],{},[158,537,538],{},"CG_RUST_TARGETS",[196,540,541,542,545,546,548,549,552,553,556,557,560,561],{},"extra rust-analyzer runs: ",[158,543,544],{},"auto"," (default, up to 3 targets the ",[158,547,430],{},"s name), ",[158,550,551],{},"0",", or a platform \u002F triple list (",[158,554,555],{},"windows,macos","). Overrides ",[158,558,559],{},".cg.yaml"," ",[158,562,563],{},"rust.targets",[178,565,566,570],{},[196,567,568],{},[158,569,357],{},[196,571,572,574],{},[158,573,237],{}," or its directory",[178,576,577,585],{},[196,578,579,253,582],{},[158,580,581],{},"CG_CFAMILY=0",[158,583,584],{},"1",[196,586,587],{},"disable or force the C\u002FC++ plugin",[178,589,590,595],{},[196,591,592],{},[158,593,594],{},"CG_JOBS",[196,596,597],{},"scip-clang workers",[178,599,600,608],{},[196,601,602,148,605],{},[158,603,604],{},"CG_NO_CARGO=1",[158,606,607],{},"CG_CARGO",[196,609,610,611,613],{},"skip ",[158,612,323],{},", or point at the cargo binary",[178,615,616,624],{},[196,617,618,148,621],{},[158,619,620],{},"CG_EXCLUDE_DIRS",[158,622,623],{},"CG_INCLUDE_DIRS",[196,625,626],{},"C\u002FC++ directory filters (comma-separated names)",[178,628,629,634],{},[196,630,631],{},[158,632,633],{},"CG_C_MASK_ANNOTATIONS=0",[196,635,636,637,640],{},"do not blank annotation macros (",[158,638,639],{},"FOO_API",") before parsing",[178,642,643,648],{},[196,644,645],{},[158,646,647],{},"CG_C_MAX_MACRO_REFS",[196,649,650],{},"references kept per macro expansion site (default 8)",[178,652,653,658],{},[196,654,655],{},[158,656,657],{},"CG_MAX_FILE_BYTES",[196,659,660],{},"skip larger C\u002FC++ files (default 30 MB)",[178,662,663,671],{},[196,664,665,148,668],{},[158,666,667],{},"CG_NO_CACHE=1",[158,669,670],{},"CG_INDEXER_TIMEOUT",[196,672,673],{},"fresh indexer run; cap in seconds",[167,675,677],{"id":676},"query-specs","Query specs",[141,679,680,681,684,685,253,688,253,691,253,694,253,697,700,701,704],{},"Qualified paths, ",[158,682,683],{},"mod:",", source files, and ",[158,686,687],{},"feature:",[158,689,690],{},"cfg:",[158,692,693],{},"define:",[158,695,696],{},"unsafe:",[158,698,699],{},"env:"," follow ",[145,702,703],{"href":151},"query targets",". Ids that page does not spell out:",[172,706,707,717],{},[175,708,709],{},[178,710,711,714],{},[181,712,713],{},"spec or id",[181,715,716],{},"selects",[191,718,719,745,766],{},[178,720,721,726],{},[196,722,723],{},[158,724,725],{},"kv_core[test:roundtrip]::put_then_get",[196,727,728,729,148,732,148,735,148,738,741,742,216],{},"a non-library target (",[158,730,731],{},"test",[158,733,734],{},"bench",[158,736,737],{},"example",[158,739,740],{},"build","). The bin crate is named for its bin target (",[158,743,744],{},"kv::main",[178,746,747,752],{},[196,748,749],{},[158,750,751],{},"crate::module::\u003CType as Trait>::method",[196,753,754,755,275,758,761,762,765],{},"a trait impl method. A call on ",[158,756,757],{},"dyn Trait",[158,759,760],{},"T: Trait"," lands on the trait method (",[158,763,764],{},"dispatch: \"trait\"",") and reaches every impl",[178,767,768,773],{},[196,769,770],{},[158,771,772],{},"src\u002Fringbuf.c#rb_lock",[196,774,775,776,779,780,783],{},"a file-local item (",[158,777,778],{},"static",", an anonymous namespace). Same-named functions in different programs take the file prefix (",[158,781,782],{},"tools\u002Fa.c#main","). Overloads keep parameter types in the id",[141,785,786,789,790,238,793,796,797,800,801,805,806,148,809,153,812,815,816,275,818,820],{},[158,787,788],{},"impact"," shows a virtual or trait base as ",[158,791,792],{},"overrides:",[158,794,795],{},"via base","), not as a caller. ",[158,798,799],{},"reaches"," groups by Rust module or C\u002FC++ directory. Gates follow ",[145,802,804],{"href":803},"\u002Fdocs\u002Fconfiguration#gate-scenarios","gate scenarios",", with native keys ",[158,807,808],{},"features_off",[158,810,811],{},"cfg_true",[158,813,814],{},"defines_off",": edges under a false ",[158,817,252],{},[158,819,256],{}," are GATED; unknown atoms stay live.",[167,822,824],{"id":823},"framework-facts","Framework facts",[172,826,827,837],{},[175,828,829],{},[178,830,831,834],{},[181,832,833],{},"area",[181,835,836],{},"what you can query",[191,838,839,900,923,957,982,1014,1035,1103],{},[178,840,841,844],{},[196,842,843],{},"Rust entry",[196,845,846,849,850,148,853,148,856,859,860,253,863,238,866,859,869,253,872,253,875,878,879,882,883,148,885,148,887,153,890,892,893,148,896,899],{},[158,847,848],{},"main"," (including ",[158,851,852],{},"#[tokio::main]",[158,854,855],{},"#[async_std::main]",[158,857,858],{},"#[actix_web::main]","), ",[158,861,862],{},"#[no_mangle]",[158,864,865],{},"#[export_name]",[158,867,868],{},"ffi_export",[158,870,871],{},"#[test]",[158,873,874],{},"#[tokio::test]",[158,876,877],{},"#[rstest]"," and ",[158,880,881],{},"tests\u002F",", plus ",[158,884,734],{},[158,886,737],{},[158,888,889],{},"build_script",[158,891,248],{}," items from a library root (",[158,894,895],{},"public_api",[158,897,898],{},"pub use"," included)",[178,901,902,905],{},[196,903,904],{},"Rust routes",[196,906,907,908,911,912,238,915,918,919,922],{},"axum ",[158,909,910],{},".route(\"\u002Fp\", get(h).post(h2))"," and actix \u002F rocket attribute routes → ",[158,913,914],{},"route:\u003CMETHOD> \u003Cpath>",[158,916,917],{},"http_route",") → ",[158,920,921],{},"ROUTES_TO"," the handler",[178,924,925,928],{},[196,926,927],{},"Rust attrs",[196,929,930,933,934,937,938,941,942,945,946,949,950,952,953,956],{},[158,931,932],{},"#[serde(default = \"f\")]"," and clap ",[158,935,936],{},"value_parser = f"," → ",[158,939,940],{},"REFERENCES_FN",". A project ",[158,943,944],{},"macro_rules!"," that expands to ",[158,947,948],{},"#[test] fn $name"," is one ",[158,951,731],{}," node per call (",[158,954,955],{},"via: \"test macro body\"","). Items inside an item-level macro body are indexed when that body parses as Rust",[178,958,959,962],{},[196,960,961],{},"Impls of external traits",[196,963,964,148,967,148,970,148,973,976,977,148,979,216],{},[158,965,966],{},"Default",[158,968,969],{},"From",[158,971,972],{},"Display",[158,974,975],{},"Drop",", a framework trait: linked from the Self type (",[158,978,198],{},[158,980,981],{},"via: external_trait",[178,983,984,987],{},[196,985,986],{},"C \u002F C++ entry",[196,988,989,253,991,253,994,997,998,878,1001,1004,1005,1008,1009,238,1012,216],{},[158,990,848],{},[158,992,993],{},"wmain",[158,995,996],{},"WinMain"," (a test, example, or bench directory retags it), gtest \u002F Catch2 \u002F doctest \u002F Boost.Test ",[158,999,1000],{},"TEST*",[158,1002,1003],{},"test*"," in test dirs, ",[158,1006,1007],{},"BENCHMARK",", and an export macro or a non-static declaration in ",[158,1010,1011],{},"include\u002F",[158,1013,895],{},[178,1015,1016,1019],{},[196,1017,1018],{},"Virtuals",[196,1020,1021,1022,253,1025,238,1028,1030,1031,1034],{},"exact: scip-clang → ",[158,1023,1024],{},"OVERRIDDEN_BY",[158,1026,1027],{},"IMPLEMENTED_BY",[158,1029,230],{},"). Heuristic: same-named methods on derived classes. The call carries ",[158,1032,1033],{},"dispatch: \"virtual\""," and fans out to every override",[178,1036,1037,1040],{},[196,1038,1039],{},"Gates and env",[196,1041,1042,937,1045,1048,1049,238,1051,1054,1055,253,1057,1060,1061,918,1064,1066,1067,148,1070,148,1073,148,1076,937,1079,1066,1082,1084,1085,253,1088,937,1091,1094,1095,1098,1099,1102],{},[158,1043,1044],{},"#[cfg(feature = \"x\")]",[158,1046,1047],{},"feature:\u003Cpackage>\u002F\u003Cfeature>","; other cfgs → ",[158,1050,690],{},[158,1052,1053],{},"cfg(test)"," marks test code). ",[158,1056,256],{},[158,1058,1059],{},"#ifdef"," (not an include guard or ",[158,1062,1063],{},"__cplusplus",[158,1065,693],{},". ",[158,1068,1069],{},"env!",[158,1071,1072],{},"option_env!",[158,1074,1075],{},"std::env::var",[158,1077,1078],{},"getenv",[158,1080,1081],{},"env:KEY",[158,1083,260],{}," blocks and ",[158,1086,1087],{},"unsafe fn",[158,1089,1090],{},"impl",[158,1092,1093],{},"unsafe:\u003Ccrate>","; ",[158,1096,1097],{},"extern \"C\""," is an ",[158,1100,1101],{},"ffi"," node",[178,1104,1105,1108],{},[196,1106,1107],{},"Macro expansions",[196,1109,1110,1111,1114,1115,1118,1119,1121,1122,1125,1126,1128],{},"a function-like macro is a ",[158,1112,1113],{},"macro"," node and a ",[158,1116,1117],{},"CALLS"," target. A clang reference at an expansion is ",[158,1120,230],{}," with ",[158,1123,1124],{},"via_macro","; sites with more symbols than ",[158,1127,647],{}," are dropped",{"title":1130,"searchDepth":1131,"depth":1132,"links":1133},"",4,2,[1134,1135,1136,1137,1138],{"id":169,"depth":1132,"text":170},{"id":268,"depth":1132,"text":242},{"id":459,"depth":1132,"text":460},{"id":676,"depth":1132,"text":677},{"id":823,"depth":1132,"text":824},"What Rust, C, and C++ add beyond Install, CLI specs, and Graph schema: heuristic vs rust-analyzer \u002F scip-clang, the indexer flags, and the ids those pages do not spell out. Toolchain fit: cg doctor -h. Why a file stayed heuristic: cg coverage.","md",{},true,{"title":71,"description":1139},"kxDZoaWKT1dGtAmZL3ektWXiAj5DDJPzwM-Kz8tY7x4",[1146,1148],{"title":67,"path":68,"stem":69,"description":1147,"children":-1},"Server: code-graph, DB: combined graph of examples\u002Fbookstore-api + examples\u002Fbookstore-web. Generated by tests\u002Fmcp_e2e.py. Volatile values (index timestamps and durations) are replaced by placeholders, so regenerating the file on unchanged code gives identical bytes.",{"title":75,"path":76,"stem":77,"description":1149,"children":-1},"cg parity compares two graphs of the same app on two platforms (an iOS app in Swift \u002F SwiftUI\nand its Android port in Kotlin \u002F Compose). It lists types, functions, enum cases and constants\nof the source graph that have no counterpart in the target.",1792170235825]