MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / parse_cargo_toml

Function parse_cargo_toml

src/pipeline/pass_pkgmap.c:385–397  ·  view source on GitHub ↗

Rust: Cargo.toml — [package] name */

Source from the content-addressed store, hash-verified

383
384/* Rust: Cargo.toml — [package] name */
385static void parse_cargo_toml(const char *source, int source_len, const char *rel_path,
386 cbm_pkg_entries_t *entries) {
387 const char *section = find_line_value(source, source_len, "[package]");
388 if (!section) {
389 return;
390 }
391 char *name = toml_extract_name(section, source + source_len);
392 if (!name) {
393 return;
394 }
395 char *entry = build_entry_path(rel_path, "src/lib");
396 pkg_entries_push(entries, name, entry);
397}
398
399/* Python: pyproject.toml — [project] name */
400/* Normalize Python package name: hyphens → underscores (PEP 503). */

Callers 1

cbm_pkgmap_try_parseFunction · 0.85

Calls 4

find_line_valueFunction · 0.85
toml_extract_nameFunction · 0.85
build_entry_pathFunction · 0.85
pkg_entries_pushFunction · 0.85

Tested by

no test coverage detected