Skip to content

Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.

24.9 KB
Raw Blame
{
  "rust/conditionals.rs": {
    "file_info": {
      "path": "lang_samples/rust/conditionals.rs",
      "language": "rust",
      "size_bytes": 389,
      "is_test": false,
      "is_config": false,
      "is_api_contract": false,
      "is_entry_point": false,
      "is_manifest_entry": false,
      "is_reachability_root": false,
      "is_application_main": false
    },
    "symbols": [
      {
        "id": "lang_samples/rust/conditionals.rs::three_ops",
        "name": "three_ops",
        "qualified_name": "lang_samples.rust.conditionals.three_ops",
        "kind": "function",
        "signature": "fn three_ops(a: bool, b: bool, c: bool, d: bool) -> i32",
        "start_line": 1,
        "end_line": 6,
        "docstring": null,
        "decorators": [],
        "visibility": "public",
        "is_async": false,
        "complexity_estimate": 1,
        "language": "rust",
        "parent_name": null,
        "is_exported_symbol": false,
        "is_declaration": false,
        "type_parameter_count": null,
        "extension_receiver": null,
        "written_receiver": null,
        "modifiers": [],
        "alias_of": null
      },
      {
        "id": "lang_samples/rust/conditionals.rs::six_ops",
        "name": "six_ops",
        "qualified_name": "lang_samples.rust.conditionals.six_ops",
        "kind": "function",
        "signature": "fn six_ops(a: bool, b: bool, c: bool, d: bool, e: bool, f: bool, g: bool) -> i32",
        "start_line": 8,
        "end_line": 13,
        "docstring": null,
        "decorators": [],
        "visibility": "public",
        "is_async": false,
        "complexity_estimate": 1,
        "language": "rust",
        "parent_name": null,
        "is_exported_symbol": false,
        "is_declaration": false,
        "type_parameter_count": null,
        "extension_receiver": null,
        "written_receiver": null,
        "modifiers": [],
        "alias_of": null
      },
      {
        "id": "lang_samples/rust/conditionals.rs::two_ops",
        "name": "two_ops",
        "qualified_name": "lang_samples.rust.conditionals.two_ops",
        "kind": "function",
        "signature": "fn two_ops(a: bool, b: bool, c: bool) -> i32",
        "start_line": 15,
        "end_line": 20,
        "docstring": null,
        "decorators": [],
        "visibility": "public",
        "is_async": false,
        "complexity_estimate": 1,
        "language": "rust",
        "parent_name": null,
        "is_exported_symbol": false,
        "is_declaration": false,
        "type_parameter_count": null,
        "extension_receiver": null,
        "written_receiver": null,
        "modifiers": [],
        "alias_of": null
      }
    ],
    "imports": [],
    "exports": [
      "three_ops",
      "six_ops",
      "two_ops"
    ],
    "export_aliases": {},
    "calls": [],
    "heritage": [],
    "docstring": null,
    "parse_errors": [],
    "content_hash": "7dbce8d308c5c223f5f47520bb7f5fc4e1fc1ec9610d956db5c7784267157c75",
    "type_refs": [],
    "local_refs": [],
    "registrars": [],
    "references": [],
    "schema_refs": [],
    "grammar_missing": false
  },
  "rust/flat_match.rs": {
    "file_info": {
      "path": "lang_samples/rust/flat_match.rs",
      "language": "rust",
      "size_bytes": 823,
      "is_test": false,
      "is_config": false,
      "is_api_contract": false,
      "is_entry_point": false,
      "is_manifest_entry": false,
      "is_reachability_root": false,
      "is_application_main": false
    },
    "symbols": [
      {
        "id": "lang_samples/rust/flat_match.rs::flat_match",
        "name": "flat_match",
        "qualified_name": "lang_samples.rust.flat_match.flat_match",
        "kind": "function",
        "signature": "fn flat_match(x: i32) -> &'static str",
        "start_line": 3,
        "end_line": 10,
        "docstring": null,
        "decorators": [],
        "visibility": "private",
        "is_async": false,
        "complexity_estimate": 1,
        "language": "rust",
        "parent_name": null,
        "is_exported_symbol": false,
        "is_declaration": false,
        "type_parameter_count": null,
        "extension_receiver": null,
        "written_receiver": null,
        "modifiers": [],
        "alias_of": null
      },
      {
        "id": "lang_samples/rust/flat_match.rs::complex_match",
        "name": "complex_match",
        "qualified_name": "lang_samples.rust.flat_match.complex_match",
        "kind": "function",
        "signature": "fn complex_match(x: i32) -> i32",
        "start_line": 14,
        "end_line": 26,
        "docstring": null,
        "decorators": [],
        "visibility": "private",
        "is_async": false,
        "complexity_estimate": 1,
        "language": "rust",
        "parent_name": null,
        "is_exported_symbol": false,
        "is_declaration": false,
        "type_parameter_count": null,
        "extension_receiver": null,
        "written_receiver": null,
        "modifiers": [],
        "alias_of": null
      },
      {
        "id": "lang_samples/rust/flat_match.rs::multi_stmt_match",
        "name": "multi_stmt_match",
        "qualified_name": "lang_samples.rust.flat_match.multi_stmt_match",
        "kind": "function",
        "signature": "fn multi_stmt_match(x: i32) -> i32",
        "start_line": 29,
        "end_line": 38,
        "docstring": null,
        "decorators": [],
        "visibility": "private",
        "is_async": false,
        "complexity_estimate": 1,
        "language": "rust",
        "parent_name": null,
        "is_exported_symbol": false,
        "is_declaration": false,
        "type_parameter_count": null,
        "extension_receiver": null,
        "written_receiver": null,
        "modifiers": [],
        "alias_of": null
      }
    ],
    "imports": [],
    "exports": [],
    "export_aliases": {},
    "calls": [],
    "heritage": [],
    "docstring": null,
    "parse_errors": [],
    "content_hash": "b83c4127399f7f23e336ebba80bbf6c4ec8a0e61427197c193239da4bae8be7f",
    "type_refs": [],
    "local_refs": [],
    "registrars": [],
    "references": [],
    "schema_refs": [],
    "grammar_missing": false
  },
  "rust/nested.rs": {
    "file_info": {
      "path": "lang_samples/rust/nested.rs",
      "language": "rust",
      "size_bytes": 375,
      "is_test": false,
      "is_config": false,
      "is_api_contract": false,
      "is_entry_point": false,
      "is_manifest_entry": false,
      "is_reachability_root": false,
      "is_application_main": false
    },
    "symbols": [
      {
        "id": "lang_samples/rust/nested.rs::deeply_nested",
        "name": "deeply_nested",
        "qualified_name": "lang_samples.rust.nested.deeply_nested",
        "kind": "function",
        "signature": "fn deeply_nested(x: i32) -> i32",
        "start_line": 1,
        "end_line": 16,
        "docstring": null,
        "decorators": [],
        "visibility": "private",
        "is_async": false,
        "complexity_estimate": 1,
        "language": "rust",
        "parent_name": null,
        "is_exported_symbol": false,
        "is_declaration": false,
        "type_parameter_count": null,
        "extension_receiver": null,
        "written_receiver": null,
        "modifiers": [],
        "alias_of": null
      },
      {
        "id": "lang_samples/rust/nested.rs::shallow",
        "name": "shallow",
        "qualified_name": "lang_samples.rust.nested.shallow",
        "kind": "function",
        "signature": "fn shallow(x: i32) -> i32",
        "start_line": 18,
        "end_line": 20,
        "docstring": null,
        "decorators": [],
        "visibility": "private",
        "is_async": false,
        "complexity_estimate": 1,
        "language": "rust",
        "parent_name": null,
        "is_exported_symbol": false,
        "is_declaration": false,
        "type_parameter_count": null,
        "extension_receiver": null,
        "written_receiver": null,
        "modifiers": [],
        "alias_of": null
      }
    ],
    "imports": [],
    "exports": [],
    "export_aliases": {},
    "calls": [],
    "heritage": [],
    "docstring": null,
    "parse_errors": [],
    "content_hash": "51ed1194d6d80798cb70fb15af0134de5e484d0e25dcc809cae9231b5e5b1121",
    "type_refs": [],
    "local_refs": [],
    "registrars": [],
    "references": [],
    "schema_refs": [],
    "grammar_missing": false
  },
  "rust/perf_io_in_loop.rs": {
    "file_info": {
      "path": "lang_samples/rust/perf_io_in_loop.rs",
      "language": "rust",
      "size_bytes": 2513,
      "is_test": false,
      "is_config": false,
      "is_api_contract": false,
      "is_entry_point": false,
      "is_manifest_entry": false,
      "is_reachability_root": false,
      "is_application_main": false
    },
    "symbols": [
      {
        "id": "lang_samples/rust/perf_io_in_loop.rs::sqlx_fetch_in_loop",
        "name": "sqlx_fetch_in_loop",
        "qualified_name": "lang_samples.rust.perf_io_in_loop.sqlx_fetch_in_loop",
        "kind": "function",
        "signature": "fn sqlx_fetch_in_loop(pool: &PgPool, ids: Vec<i32>)",
        "start_line": 14,
        "end_line": 20,
        "docstring": null,
        "decorators": [],
        "visibility": "private",
        "is_async": false,
        "complexity_estimate": 1,
        "language": "rust",
        "parent_name": null,
        "is_exported_symbol": false,
        "is_declaration": false,
        "type_parameter_count": null,
        "extension_receiver": null,
        "written_receiver": null,
        "modifiers": [],
        "alias_of": null
      },
      {
        "id": "lang_samples/rust/perf_io_in_loop.rs::fs_read_in_loop",
        "name": "fs_read_in_loop",
        "qualified_name": "lang_samples.rust.perf_io_in_loop.fs_read_in_loop",
        "kind": "function",
        "signature": "fn fs_read_in_loop(paths: Vec<String>)",
        "start_line": 22,
        "end_line": 26,
        "docstring": null,
        "decorators": [],
        "visibility": "private",
        "is_async": false,
        "complexity_estimate": 1,
        "language": "rust",
        "parent_name": null,
        "is_exported_symbol": false,
        "is_declaration": false,
        "type_parameter_count": null,
        "extension_receiver": null,
        "written_receiver": null,
        "modifiers": [],
        "alias_of": null
      },
      {
        "id": "lang_samples/rust/perf_io_in_loop.rs::fs_read_to_string_in_loop",
        "name": "fs_read_to_string_in_loop",
        "qualified_name": "lang_samples.rust.perf_io_in_loop.fs_read_to_string_in_loop",
        "kind": "function",
        "signature": "fn fs_read_to_string_in_loop(paths: Vec<String>)",
        "start_line": 28,
        "end_line": 32,
        "docstring": null,
        "decorators": [],
        "visibility": "private",
        "is_async": false,
        "complexity_estimate": 1,
        "language": "rust",
        "parent_name": null,
        "is_exported_symbol": false,
        "is_declaration": false,
        "type_parameter_count": null,
        "extension_receiver": null,
        "written_receiver": null,
        "modifiers": [],
        "alias_of": null
      },
      {
        "id": "lang_samples/rust/perf_io_in_loop.rs::reqwest_get_in_loop",
        "name": "reqwest_get_in_loop",
        "qualified_name": "lang_samples.rust.perf_io_in_loop.reqwest_get_in_loop",
        "kind": "function",
        "signature": "fn reqwest_get_in_loop(urls: Vec<String>)",
        "start_line": 34,
        "end_line": 39,
        "docstring": null,
        "decorators": [],
        "visibility": "private",
        "is_async": false,
        "complexity_estimate": 1,
        "language": "rust",
        "parent_name": null,
        "is_exported_symbol": false,
        "is_declaration": false,
        "type_parameter_count": null,
        "extension_receiver": null,
        "written_receiver": null,
        "modifiers": [],
        "alias_of": null
      },
      {
        "id": "lang_samples/rust/perf_io_in_loop.rs::regex_new_in_loop",
        "name": "regex_new_in_loop",
        "qualified_name": "lang_samples.rust.perf_io_in_loop.regex_new_in_loop",
        "kind": "function",
        "signature": "fn regex_new_in_loop(items: Vec<String>)",
        "start_line": 41,
        "end_line": 47,
        "docstring": null,
        "decorators": [],
        "visibility": "private",
        "is_async": false,
        "complexity_estimate": 1,
        "language": "rust",
        "parent_name": null,
        "is_exported_symbol": false,
        "is_declaration": false,
        "type_parameter_count": null,
        "extension_receiver": null,
        "written_receiver": null,
        "modifiers": [],
        "alias_of": null
      },
      {
        "id": "lang_samples/rust/perf_io_in_loop.rs::pgpool_connect_in_loop",
        "name": "pgpool_connect_in_loop",
        "qualified_name": "lang_samples.rust.perf_io_in_loop.pgpool_connect_in_loop",
        "kind": "function",
        "signature": "fn pgpool_connect_in_loop(urls: Vec<String>)",
        "start_line": 49,
        "end_line": 54,
        "docstring": null,
        "decorators": [],
        "visibility": "private",
        "is_async": false,
        "complexity_estimate": 1,
        "language": "rust",
        "parent_name": null,
        "is_exported_symbol": false,
        "is_declaration": false,
        "type_parameter_count": null,
        "extension_receiver": null,
        "written_receiver": null,
        "modifiers": [],
        "alias_of": null
      },
      {
        "id": "lang_samples/rust/perf_io_in_loop.rs::thread_sleep_in_async",
        "name": "thread_sleep_in_async",
        "qualified_name": "lang_samples.rust.perf_io_in_loop.thread_sleep_in_async",
        "kind": "function",
        "signature": "fn thread_sleep_in_async(d: std::time::Duration)",
        "start_line": 56,
        "end_line": 58,
        "docstring": null,
        "decorators": [],
        "visibility": "private",
        "is_async": false,
        "complexity_estimate": 1,
        "language": "rust",
        "parent_name": null,
        "is_exported_symbol": false,
        "is_declaration": false,
        "type_parameter_count": null,
        "extension_receiver": null,
        "written_receiver": null,
        "modifiers": [],
        "alias_of": null
      },
      {
        "id": "lang_samples/rust/perf_io_in_loop.rs::fs_read_constant_loop",
        "name": "fs_read_constant_loop",
        "qualified_name": "lang_samples.rust.perf_io_in_loop.fs_read_constant_loop",
        "kind": "function",
        "signature": "fn fs_read_constant_loop()",
        "start_line": 62,
        "end_line": 66,
        "docstring": null,
        "decorators": [],
        "visibility": "private",
        "is_async": false,
        "complexity_estimate": 1,
        "language": "rust",
        "parent_name": null,
        "is_exported_symbol": false,
        "is_declaration": false,
        "type_parameter_count": null,
        "extension_receiver": null,
        "written_receiver": null,
        "modifiers": [],
        "alias_of": null
      },
      {
        "id": "lang_samples/rust/perf_io_in_loop.rs::fs_read_outside_loop",
        "name": "fs_read_outside_loop",
        "qualified_name": "lang_samples.rust.perf_io_in_loop.fs_read_outside_loop",
        "kind": "function",
        "signature": "fn fs_read_outside_loop(p: String)",
        "start_line": 68,
        "end_line": 70,
        "docstring": null,
        "decorators": [],
        "visibility": "private",
        "is_async": false,
        "complexity_estimate": 1,
        "language": "rust",
        "parent_name": null,
        "is_exported_symbol": false,
        "is_declaration": false,
        "type_parameter_count": null,
        "extension_receiver": null,
        "written_receiver": null,
        "modifiers": [],
        "alias_of": null
      },
      {
        "id": "lang_samples/rust/perf_io_in_loop.rs::push_str_in_loop",
        "name": "push_str_in_loop",
        "qualified_name": "lang_samples.rust.perf_io_in_loop.push_str_in_loop",
        "kind": "function",
        "signature": "fn push_str_in_loop(items: Vec<String>) -> String",
        "start_line": 72,
        "end_line": 78,
        "docstring": null,
        "decorators": [],
        "visibility": "private",
        "is_async": false,
        "complexity_estimate": 1,
        "language": "rust",
        "parent_name": null,
        "is_exported_symbol": false,
        "is_declaration": false,
        "type_parameter_count": null,
        "extension_receiver": null,
        "written_receiver": null,
        "modifiers": [],
        "alias_of": null
      }
    ],
    "imports": [
      {
        "raw_statement": "use std::fs;",
        "module_path": "std::fs",
        "imported_names": [
          "fs"
        ],
        "is_relative": false,
        "resolved_file": null,
        "bindings": [
          {
            "local_name": "fs",
            "exported_name": "fs",
            "source_file": null,
            "is_module_alias": false,
            "is_global": false,
            "is_static_import": false,
            "line": null,
            "column": null
          }
        ],
        "is_reexport": false,
        "is_module_declaration": false,
        "type_only": false,
        "deferred": false
      }
    ],
    "exports": [],
    "export_aliases": {},
    "calls": [
      {
        "target_name": "query",
        "receiver_name": "sqlx",
        "caller_symbol_id": "lang_samples/rust/perf_io_in_loop.rs::sqlx_fetch_in_loop",
        "line": 18,
        "argument_count": 1,
        "receiver_call": null,
        "scope_name": null,
        "edge_type": "calls",
        "supplied_props": null,
        "bare_name_fallback": false,
        "spawned": false,
        "program_call": false,
        "argument_types": null,
        "argument_names": null
      },
      {
        "target_name": "fetch_all",
        "receiver_name": null,
        "caller_symbol_id": "lang_samples/rust/perf_io_in_loop.rs::sqlx_fetch_in_loop",
        "line": 18,
        "argument_count": 1,
        "receiver_call": null,
        "scope_name": null,
        "edge_type": "calls",
        "supplied_props": null,
        "bare_name_fallback": false,
        "spawned": false,
        "program_call": false,
        "argument_types": null,
        "argument_names": null
      },
      {
        "target_name": "read",
        "receiver_name": "std::fs",
        "caller_symbol_id": "lang_samples/rust/perf_io_in_loop.rs::fs_read_in_loop",
        "line": 24,
        "argument_count": 1,
        "receiver_call": null,
        "scope_name": null,
        "edge_type": "calls",
        "supplied_props": null,
        "bare_name_fallback": false,
        "spawned": false,
        "program_call": false,
        "argument_types": null,
        "argument_names": null
      },
      {
        "target_name": "read_to_string",
        "receiver_name": "fs",
        "caller_symbol_id": "lang_samples/rust/perf_io_in_loop.rs::fs_read_to_string_in_loop",
        "line": 30,
        "argument_count": 1,
        "receiver_call": null,
        "scope_name": null,
        "edge_type": "calls",
        "supplied_props": null,
        "bare_name_fallback": false,
        "spawned": false,
        "program_call": false,
        "argument_types": null,
        "argument_names": null
      },
      {
        "target_name": "get",
        "receiver_name": "reqwest",
        "caller_symbol_id": "lang_samples/rust/perf_io_in_loop.rs::reqwest_get_in_loop",
        "line": 37,
        "argument_count": 1,
        "receiver_call": null,
        "scope_name": null,
        "edge_type": "calls",
        "supplied_props": null,
        "bare_name_fallback": false,
        "spawned": false,
        "program_call": false,
        "argument_types": null,
        "argument_names": null
      },
      {
        "target_name": "new",
        "receiver_name": "Regex",
        "caller_symbol_id": "lang_samples/rust/perf_io_in_loop.rs::regex_new_in_loop",
        "line": 43,
        "argument_count": 1,
        "receiver_call": null,
        "scope_name": null,
        "edge_type": "calls",
        "supplied_props": null,
        "bare_name_fallback": false,
        "spawned": false,
        "program_call": false,
        "argument_types": null,
        "argument_names": null
      },
      {
        "target_name": "new",
        "receiver_name": "Regex",
        "caller_symbol_id": "lang_samples/rust/perf_io_in_loop.rs::regex_new_in_loop",
        "line": 44,
        "argument_count": 1,
        "receiver_call": null,
        "scope_name": null,
        "edge_type": "calls",
        "supplied_props": null,
        "bare_name_fallback": false,
        "spawned": false,
        "program_call": false,
        "argument_types": null,
        "argument_names": null
      },
      {
        "target_name": "connect",
        "receiver_name": "PgPool",
        "caller_symbol_id": "lang_samples/rust/perf_io_in_loop.rs::pgpool_connect_in_loop",
        "line": 52,
        "argument_count": 1,
        "receiver_call": null,
        "scope_name": null,
        "edge_type": "calls",
        "supplied_props": null,
        "bare_name_fallback": false,
        "spawned": false,
        "program_call": false,
        "argument_types": null,
        "argument_names": null
      },
      {
        "target_name": "sleep",
        "receiver_name": "std::thread",
        "caller_symbol_id": "lang_samples/rust/perf_io_in_loop.rs::thread_sleep_in_async",
        "line": 57,
        "argument_count": 1,
        "receiver_call": null,
        "scope_name": null,
        "edge_type": "calls",
        "supplied_props": null,
        "bare_name_fallback": false,
        "spawned": false,
        "program_call": false,
        "argument_types": null,
        "argument_names": null
      },
      {
        "target_name": "read",
        "receiver_name": "std::fs",
        "caller_symbol_id": "lang_samples/rust/perf_io_in_loop.rs::fs_read_constant_loop",
        "line": 64,
        "argument_count": 1,
        "receiver_call": null,
        "scope_name": null,
        "edge_type": "calls",
        "supplied_props": null,
        "bare_name_fallback": false,
        "spawned": false,
        "program_call": false,
        "argument_types": null,
        "argument_names": null
      },
      {
        "target_name": "read",
        "receiver_name": "std::fs",
        "caller_symbol_id": "lang_samples/rust/perf_io_in_loop.rs::fs_read_outside_loop",
        "line": 69,
        "argument_count": 1,
        "receiver_call": null,
        "scope_name": null,
        "edge_type": "calls",
        "supplied_props": null,
        "bare_name_fallback": false,
        "spawned": false,
        "program_call": false,
        "argument_types": null,
        "argument_names": null
      },
      {
        "target_name": "new",
        "receiver_name": "String",
        "caller_symbol_id": "lang_samples/rust/perf_io_in_loop.rs::push_str_in_loop",
        "line": 73,
        "argument_count": 0,
        "receiver_call": null,
        "scope_name": null,
        "edge_type": "calls",
        "supplied_props": null,
        "bare_name_fallback": false,
        "spawned": false,
        "program_call": false,
        "argument_types": null,
        "argument_names": null
      },
      {
        "target_name": "push_str",
        "receiver_name": "s",
        "caller_symbol_id": "lang_samples/rust/perf_io_in_loop.rs::push_str_in_loop",
        "line": 75,
        "argument_count": 1,
        "receiver_call": null,
        "scope_name": null,
        "edge_type": "calls",
        "supplied_props": null,
        "bare_name_fallback": false,
        "spawned": false,
        "program_call": false,
        "argument_types": null,
        "argument_names": null
      }
    ],
    "heritage": [],
    "docstring": null,
    "parse_errors": [],
    "content_hash": "b03c4c31a915ad094d4254270e7576891f606d4e4a2455d39651575ddd14bc04",
    "type_refs": [
      {
        "type_name": "PgPool",
        "line": 14,
        "origin": "method_param"
      },
      {
        "type_name": "Duration",
        "line": 56,
        "origin": "method_param"
      }
    ],
    "local_refs": [],
    "registrars": [],
    "references": [
      {
        "target_name": "pool",
        "receiver_name": null,
        "caller_symbol_id": "lang_samples/rust/perf_io_in_loop.rs::sqlx_fetch_in_loop",
        "line": 18,
        "argument_count": null,
        "receiver_call": null,
        "scope_name": null,
        "edge_type": "calls",
        "supplied_props": null,
        "bare_name_fallback": false,
        "spawned": false,
        "program_call": false,
        "argument_types": null,
        "argument_names": null
      },
      {
        "target_name": "d",
        "receiver_name": null,
        "caller_symbol_id": "lang_samples/rust/perf_io_in_loop.rs::thread_sleep_in_async",
        "line": 57,
        "argument_count": null,
        "receiver_call": null,
        "scope_name": null,
        "edge_type": "calls",
        "supplied_props": null,
        "bare_name_fallback": false,
        "spawned": false,
        "program_call": false,
        "argument_types": null,
        "argument_names": null
      }
    ],
    "schema_refs": [],
    "grammar_missing": false
  }
}