Skip to content

Commit

Permalink
Merge pull request #170 from singnet/angelo/#164/moving-atom-db
Browse files Browse the repository at this point in the history
  • Loading branch information
angeloprobst authored Jan 9, 2025
2 parents ef927af + 6f7eeee commit 88e4793
Show file tree
Hide file tree
Showing 36 changed files with 2,497 additions and 66 deletions.
6 changes: 6 additions & 0 deletions src/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
bazel-bin
bazel-out
bazel-cpp
bazel-python
bazel-testlogs

3 changes: 0 additions & 3 deletions src/BUILD

This file was deleted.

2 changes: 1 addition & 1 deletion src/ab.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

rm -f ../bin/* && ../scripts/bazel_build.sh && ../bin/attention_broker 37007
rm -f ./bin/* && ./scripts/build.sh && ./bin/attention_broker_service 37007
File renamed without changes.
32 changes: 16 additions & 16 deletions src/cpp/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,61 +2,61 @@ cc_binary(
name = "attention_broker_service",
srcs = [],
defines = ["BAZEL_BUILD"],
linkstatic = 1,
deps = [
"//cpp/main:attention_broker_main_lib",
"//cpp/utils:utils_lib",
"@com_github_singnet_das_proto//:attention_broker_cc_grpc",
"//main:attention_broker_main_lib",
"//utils:utils_lib",
"@com_github_grpc_grpc//:grpc++",
"@com_github_grpc_grpc//:grpc++_reflection",
"@com_github_singnet_das_proto//:attention_broker_cc_grpc",
"@mbedcrypto//:lib",
],
linkstatic = 1
)

cc_binary(
name = "query_broker",
srcs = [],
defines = ["BAZEL_BUILD"],
linkstatic = 1,
deps = [
"//cpp/main:query_engine_main_lib",
"//cpp/utils:utils_lib",
"//main:query_engine_main_lib",
"//utils:utils_lib",
"@mbedcrypto//:lib",
],
linkstatic = 1
)

cc_binary(
name = "query",
srcs = [],
defines = ["BAZEL_BUILD"],
linkstatic = 1,
deps = [
"//cpp/main:query_client_main_lib",
"//cpp/utils:utils_lib",
"//main:query_client_main_lib",
"//utils:utils_lib",
"@mbedcrypto//:lib",
],
linkstatic = 1
)

cc_binary(
name = "link_creation_engine",
srcs = [],
defines = ["BAZEL_BUILD"],
linkstatic = 1,
deps = [
"//cpp/main:link_creation_engine_main_lib",
"//cpp/utils:utils_lib",
"//main:link_creation_engine_main_lib",
"//utils:utils_lib",
"@mbedcrypto//:lib",
],
linkstatic = 1
)

cc_binary(
name = "word_query",
srcs = [],
defines = ["BAZEL_BUILD"],
linkstatic = 1,
deps = [
"//cpp/main:word_query_main_lib",
"//cpp/utils:utils_lib",
"//main:word_query_main_lib",
"//utils:utils_lib",
"@mbedcrypto//:lib",
],
linkstatic = 1
)
File renamed without changes.
File renamed without changes.
11 changes: 8 additions & 3 deletions src/WORKSPACE → src/cpp/WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
workspace(name = "rules_cpp_das")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
Expand All @@ -19,24 +21,27 @@ http_archive(
)

load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")

grpc_deps()

load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps")

grpc_extra_deps()

http_archive(
name = "com_github_google_googletest",
strip_prefix = "googletest-1.14.0",
urls = ["https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz"]
urls = ["https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz"],
)

new_local_repository(
name = "mbedcrypto",
path = "/opt/3rd-party/mbedcrypto",
build_file_content = '\
cc_library(\
name = "lib",\
srcs = ["libmbedcrypto.a"],\
visibility = ["//visibility:public"],\
)\
'
',
path = "/opt/3rd-party/mbedcrypto",
)
4 changes: 2 additions & 2 deletions src/cpp/attention_broker/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ cc_library(
hdrs = glob(["*.h"]),
includes = ["."],
deps = [
"//cpp/utils:utils_lib",
"//cpp/hasher:hasher_lib",
"//utils:utils_lib",
"//hasher:hasher_lib",
"@com_github_singnet_das_proto//:attention_broker_cc_grpc",
"@com_github_grpc_grpc//:grpc++",
"@com_github_grpc_grpc//:grpc++_reflection",
Expand Down
10 changes: 5 additions & 5 deletions src/cpp/main/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cc_library(
srcs = ["attention_broker_main.cc"],
hdrs = glob(["*.h"]),
deps = [
"//cpp/attention_broker:attention_broker_server_lib",
"//attention_broker:attention_broker_server_lib",
"@com_github_singnet_das_proto//:attention_broker_cc_grpc",
"@com_github_grpc_grpc//:grpc++",
"@com_github_grpc_grpc//:grpc++_reflection",
Expand All @@ -17,7 +17,7 @@ cc_library(
srcs = ["query_engine_main.cc"],
hdrs = glob(["*.h"]),
deps = [
"//cpp/query_engine:query_engine_lib",
"//query_engine:query_engine_lib",
],
)

Expand All @@ -26,7 +26,7 @@ cc_library(
srcs = ["query_client_main.cc"],
hdrs = glob(["*.h"]),
deps = [
"//cpp/query_engine:query_engine_lib",
"//query_engine:query_engine_lib",
],
)

Expand All @@ -35,7 +35,7 @@ cc_library(
srcs = ["link_creation_engine_main.cc"],
hdrs = glob(["*.h"]),
deps = [
"//cpp/query_engine:query_engine_lib",
"//query_engine:query_engine_lib",
],
)

Expand All @@ -44,6 +44,6 @@ cc_library(
srcs = ["word_query_main.cc"],
hdrs = glob(["*.h"]),
deps = [
"//cpp/query_engine:query_engine_lib",
"//query_engine:query_engine_lib",
],
)
6 changes: 3 additions & 3 deletions src/cpp/query_engine/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ cc_library(
hdrs = glob(["*.h", "query_element/*.h"]),
includes = [".", "query_element"],
deps = [
"//cpp/utils:utils_lib",
"//cpp/hasher:hasher_lib",
"//cpp/attention_broker:attention_broker_server_lib",
"//utils:utils_lib",
"//hasher:hasher_lib",
"//attention_broker:attention_broker_server_lib",
"@com_github_singnet_das_node//:atomspacenode",
],
linkopts = [
Expand Down
36 changes: 18 additions & 18 deletions src/cpp/tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cc_test(
"@com_github_singnet_das_proto//:attention_broker_cc_grpc",
"@com_github_grpc_grpc//:grpc++",
"@com_github_grpc_grpc//:grpc++_reflection",
"//cpp/attention_broker:attention_broker_server_lib",
"//attention_broker:attention_broker_server_lib",
"@mbedcrypto//:lib",
],
linkstatic = 1
Expand All @@ -30,7 +30,7 @@ cc_test(
"@com_github_singnet_das_proto//:attention_broker_cc_grpc",
"@com_github_grpc_grpc//:grpc++",
"@com_github_grpc_grpc//:grpc++_reflection",
"//cpp/attention_broker:attention_broker_server_lib",
"//attention_broker:attention_broker_server_lib",
"@mbedcrypto//:lib",
],
linkstatic = 1
Expand All @@ -49,8 +49,8 @@ cc_test(
"@com_github_singnet_das_proto//:attention_broker_cc_grpc",
"@com_github_grpc_grpc//:grpc++",
"@com_github_grpc_grpc//:grpc++_reflection",
"//cpp/attention_broker:attention_broker_server_lib",
"//cpp/utils:utils_lib",
"//attention_broker:attention_broker_server_lib",
"//utils:utils_lib",
"@mbedcrypto//:lib",
],
linkstatic = 1
Expand All @@ -69,7 +69,7 @@ cc_test(
"@com_github_singnet_das_proto//:attention_broker_cc_grpc",
"@com_github_grpc_grpc//:grpc++",
"@com_github_grpc_grpc//:grpc++_reflection",
"//cpp/attention_broker:attention_broker_server_lib",
"//attention_broker:attention_broker_server_lib",
"@mbedcrypto//:lib",
],
linkstatic = 1
Expand All @@ -88,7 +88,7 @@ cc_test(
"@com_github_singnet_das_proto//:attention_broker_cc_grpc",
"@com_github_grpc_grpc//:grpc++",
"@com_github_grpc_grpc//:grpc++_reflection",
"//cpp/attention_broker:attention_broker_server_lib",
"//attention_broker:attention_broker_server_lib",
"@mbedcrypto//:lib",
],
linkstatic = 1
Expand All @@ -107,8 +107,8 @@ cc_test(
"@com_github_singnet_das_proto//:attention_broker_cc_grpc",
"@com_github_grpc_grpc//:grpc++",
"@com_github_grpc_grpc//:grpc++_reflection",
"//cpp/attention_broker:attention_broker_server_lib",
"//cpp/utils:utils_lib",
"//attention_broker:attention_broker_server_lib",
"//utils:utils_lib",
"@mbedcrypto//:lib",
],
linkstatic = 1
Expand All @@ -127,7 +127,7 @@ cc_test(
"@com_github_singnet_das_proto//:attention_broker_cc_grpc",
"@com_github_grpc_grpc//:grpc++",
"@com_github_grpc_grpc//:grpc++_reflection",
"//cpp/attention_broker:attention_broker_server_lib",
"//attention_broker:attention_broker_server_lib",
"@mbedcrypto//:lib",
],
linkstatic = 1
Expand All @@ -146,7 +146,7 @@ cc_test(
"@com_github_singnet_das_proto//:attention_broker_cc_grpc",
"@com_github_grpc_grpc//:grpc++",
"@com_github_grpc_grpc//:grpc++_reflection",
"//cpp/attention_broker:attention_broker_server_lib",
"//attention_broker:attention_broker_server_lib",
"@mbedcrypto//:lib",
],
linkstatic = 1
Expand All @@ -162,7 +162,7 @@ cc_test(
],
deps = [
"@com_github_google_googletest//:gtest_main",
"//cpp/query_engine:query_engine_lib",
"//query_engine:query_engine_lib",
],
linkopts = [
#"-L/opt/3rd-party/mbedcrypto",
Expand All @@ -186,7 +186,7 @@ cc_test(
],
deps = [
"@com_github_google_googletest//:gtest_main",
"//cpp/query_engine:query_engine_lib",
"//query_engine:query_engine_lib",
],
linkopts = [
"-lmbedcrypto",
Expand All @@ -209,7 +209,7 @@ cc_test(
],
deps = [
"@com_github_google_googletest//:gtest_main",
"//cpp/query_engine:query_engine_lib",
"//query_engine:query_engine_lib",
],
linkopts = [
],
Expand All @@ -226,7 +226,7 @@ cc_test(
],
deps = [
"@com_github_google_googletest//:gtest_main",
"//cpp/query_engine:query_engine_lib",
"//query_engine:query_engine_lib",
],
linkopts = [
#"-L/opt/3rd-party/mbedcrypto",
Expand All @@ -250,7 +250,7 @@ cc_test(
],
deps = [
"@com_github_google_googletest//:gtest_main",
"//cpp/query_engine:query_engine_lib",
"//query_engine:query_engine_lib",
],
linkopts = [
#"-L/opt/3rd-party/mbedcrypto",
Expand All @@ -274,7 +274,7 @@ cc_test(
],
deps = [
"@com_github_google_googletest//:gtest_main",
"//cpp/query_engine:query_engine_lib",
"//query_engine:query_engine_lib",
],
linkopts = [
"-lmbedcrypto",
Expand All @@ -297,7 +297,7 @@ cc_test(
],
deps = [
"@com_github_google_googletest//:gtest_main",
"//cpp/query_engine:query_engine_lib",
"//query_engine:query_engine_lib",
],
linkopts = [
"-lmbedcrypto",
Expand All @@ -320,7 +320,7 @@ cc_test(
],
deps = [
"@com_github_google_googletest//:gtest_main",
"//cpp/query_engine:query_engine_lib",
"//query_engine:query_engine_lib",
],
linkstatic = 1
)
1 change: 1 addition & 0 deletions src/python/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package(default_visibility = ["//visibility:public"])
6 changes: 6 additions & 0 deletions src/python/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
###############################################################################
# Bazel now uses Bzlmod by default to manage external dependencies.
# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel.
#
# For more details, please check https://github.com/bazelbuild/bazel/issues/18958
###############################################################################
Loading

0 comments on commit 88e4793

Please sign in to comment.