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

Function write_blob_s

scripts/extract_nomic_vectors.py:334–351  ·  view source on GitHub ↗

Write assembler .incbin directive.

(path: str, incbin_path: str)

Source from the content-addressed store, hash-verified

332
333
334def write_blob_s(path: str, incbin_path: str):
335 """Write assembler .incbin directive."""
336 with open(path, "w") as f:
337 f.write(f"""/* nomic-embed-code vector blob embedded via assembler. */
338 .section __DATA,__const
339 .globl _PRETRAINED_VECTOR_BLOB
340 .globl _PRETRAINED_VECTOR_BLOB_LEN
341 .p2align 4
342_PRETRAINED_VECTOR_BLOB:
343 .incbin "{incbin_path}"
344_PRETRAINED_VECTOR_BLOB_END:
345
346 .section __DATA,__const
347 .p2align 2
348_PRETRAINED_VECTOR_BLOB_LEN:
349 .long _PRETRAINED_VECTOR_BLOB_END - _PRETRAINED_VECTOR_BLOB
350""")
351 print(f" {path}: written")
352
353
354# ── Main ─────────────────────────────────────────────────────────────

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected