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

Function parse_cargo_toml

src/pipeline/pass_pkgmap.c:389–401  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

387
388/* Rust: Cargo.toml — [package] name */
389static void parse_cargo_toml(const char *source, int source_len, const char *rel_path,
390 cbm_pkg_entries_t *entries) {
391 const char *section = find_line_value(source, source_len, "[package]");
392 if (!section) {
393 return;
394 }
395 char *name = toml_extract_name(section, source + source_len);
396 if (!name) {
397 return;
398 }
399 char *entry = build_entry_path(rel_path, "src/lib");
400 pkg_entries_push(entries, name, entry);
401}
402
403/* Python: pyproject.toml — [project] name */
404/* 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