Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Makefile.cbm
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ PIPELINE_SRCS = \

# SimHash / MinHash, watcher and git context modules are Zig: see CBM_ZIG_SRC.

# Semantic embedding module
SEMANTIC_SRCS = src/semantic/semantic.c src/semantic/ast_profile.c src/semantic/rotsq.c
# Semantic embedding module: implemented in Zig (src/semantic/*.zig, part of libcbm_zig)
SEMANTIC_SRCS =

# nomic-embed-code pretrained vectors (assembler blob)
UNIXCODER_BLOB_SRC = vendored/nomic/code_vectors_blob.S
Expand Down Expand Up @@ -479,6 +479,10 @@ CBM_ZIG_SRCS = $(CBM_ZIG_SRC) src/cbm_zig_c.h src/cli_zig/cbm_cli_zig.zig src/cl
src/discover/discover.h src/discover/userconfig.h \
src/git/git_context.zig src/git/git_context.h \
src/graph_buffer/graph_buffer.zig src/graph_buffer/graph_buffer.h \
src/semantic/ast_profile.zig src/semantic/fp.zig src/semantic/rotsq.zig \
src/semantic/semantic.zig \
src/semantic/ast_profile.h src/semantic/rotsq.h src/semantic/semantic.h \
vendored/nomic/code_vectors.h vendored/nomic/code_tokens.h \
src/simhash/minhash.zig src/simhash/minhash.h \
src/store/store.zig src/store/store.h \
src/watcher/watcher.zig src/watcher/watcher.h \
Expand Down
3 changes: 0 additions & 3 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -564,9 +564,6 @@ const native_sources = [_][]const u8{
"src/pipeline/pass_complexity.c",
"src/pipeline/pass_importance.c",
"src/pipeline/pass_pkgmap.c",
"src/semantic/semantic.c",
"src/semantic/ast_profile.c",
"src/semantic/rotsq.c",
"vendored/yyjson/yyjson.c",
"internal/cbm/cbm.c",
"internal/cbm/extract_defs.c",
Expand Down
2 changes: 1 addition & 1 deletion scripts/extract_nomic_vectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ def main():
print()
print("next steps:")
print(f" 1. update Makefile.cbm: change UNIXCODER_BLOB_SRC path to vendored/nomic/")
print(f" 2. update #include in semantic.c: \"vendored/nomic/code_vectors.h\"")
print(f" 2. update #include in src/cbm_zig_c.h: \"nomic/code_vectors.h\"")
print(f" 3. arch -arm64 make -j12 -f Makefile.cbm clean-c && arch -arm64 make -j12 -f Makefile.cbm")


Expand Down
3 changes: 3 additions & 0 deletions src/cbm_zig.zig
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ comptime {
checkExports(@import("mcp/project_tools.zig"));
checkExports(@import("mcp/search_tools.zig"));
checkExports(@import("mcp/server.zig"));
checkExports(@import("semantic/ast_profile.zig"));
checkExports(@import("semantic/rotsq.zig"));
checkExports(@import("semantic/semantic.zig"));
checkExports(@import("simhash/minhash.zig"));
checkExports(@import("store/store.zig"));
checkExports(@import("watcher/watcher.zig"));
Expand Down
4 changes: 3 additions & 1 deletion src/cbm_zig_c.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@
#include "foundation/compat_fs_internal.h"
#include "foundation/yaml.h"
#include "mcp/mcp.h"
#include "nomic/code_vectors.h"
#include "pipeline/pipeline.h"
#include "pipeline/worker_pool.h"
#include "semantic/semantic.h"
#include "store/store.h"
#include "tree_sitter/api.h"
#include "zova/cbm_zova.h"
Expand Down Expand Up @@ -139,6 +139,8 @@ static inline FILE *cbm_zig_stderr(void) {
#include "git/git_context.h"
#include "graph_buffer/graph_buffer.h"
#include "mcp/index_supervisor.h"
#include "semantic/ast_profile.h"
#include "semantic/semantic.h"
#include "simhash/minhash.h"
#include "watcher/watcher.h"

Expand Down
Loading