annotate seobeo/BUILD @ 72:4532ce6d9eb8

[Seobeo] Added router to the server logic. Few dowa string manipulation logics.
author June Park <parkjune1995@gmail.com>
date Mon, 29 Dec 2025 07:50:07 -0800
parents 6626ec933933
children 70401cf61e97
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
5695ef413be0 Initialized mono repo with bazels with few examples.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
1 load("@rules_cc//cc:cc_binary.bzl", "cc_binary")
1
adcfad6e86fb Updated naming and separated out some logic within seobeo.
June Park <parkjune1995@gmail.com>
parents: 0
diff changeset
2 load("@rules_cc//cc:cc_library.bzl", "cc_library")
67
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
3 load("@rules_cc//cc:cc_test.bzl", "cc_test")
0
5695ef413be0 Initialized mono repo with bazels with few examples.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
4
18
fa2b8af609d9 [Seobeo] Fixed a bug with pathing. Support SSL.
June Park <parkjune1995@gmail.com>
parents: 17
diff changeset
5
6
1e61008b9980 [Seobeo] Updated seobeo so that API is more opinionated. Added my webpage./build.sh
June Park <parkjune1995@gmail.com>
parents: 3
diff changeset
6 filegroup(
11
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents: 7
diff changeset
7 name = "seobeo_hdrs",
6
1e61008b9980 [Seobeo] Updated seobeo so that API is more opinionated. Added my webpage./build.sh
June Park <parkjune1995@gmail.com>
parents: 3
diff changeset
8 srcs = [
1e61008b9980 [Seobeo] Updated seobeo so that API is more opinionated. Added my webpage./build.sh
June Park <parkjune1995@gmail.com>
parents: 3
diff changeset
9 "seobeo.h",
7
114cad94008f [Seobeo] Updated to support thread and edge server calls.
June Park <parkjune1995@gmail.com>
parents: 6
diff changeset
10 "seobeo_internal.h",
67
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
11 "snapshot_creator.h",
6
1e61008b9980 [Seobeo] Updated seobeo so that API is more opinionated. Added my webpage./build.sh
June Park <parkjune1995@gmail.com>
parents: 3
diff changeset
12 ],
1e61008b9980 [Seobeo] Updated seobeo so that API is more opinionated. Added my webpage./build.sh
June Park <parkjune1995@gmail.com>
parents: 3
diff changeset
13 visibility = ["//visibility:public"],
0
5695ef413be0 Initialized mono repo with bazels with few examples.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
14 )
5695ef413be0 Initialized mono repo with bazels with few examples.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
15
67
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
16 # Server-only target (no SSL, no OpenSSL dependency)
7
114cad94008f [Seobeo] Updated to support thread and edge server calls.
June Park <parkjune1995@gmail.com>
parents: 6
diff changeset
17 alias(
67
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
18 name = "seobeo_server",
7
114cad94008f [Seobeo] Updated to support thread and edge server calls.
June Park <parkjune1995@gmail.com>
parents: 6
diff changeset
19 actual = select({
67
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
20 "//config:macos": ":seobeo_server_macos",
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
21 "//config:linux": ":seobeo_server_linux",
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
22 "//conditions:default": ":seobeo_server_linux",
7
114cad94008f [Seobeo] Updated to support thread and edge server calls.
June Park <parkjune1995@gmail.com>
parents: 6
diff changeset
23 }),
114cad94008f [Seobeo] Updated to support thread and edge server calls.
June Park <parkjune1995@gmail.com>
parents: 6
diff changeset
24 visibility = ["//visibility:public"],
114cad94008f [Seobeo] Updated to support thread and edge server calls.
June Park <parkjune1995@gmail.com>
parents: 6
diff changeset
25 )
114cad94008f [Seobeo] Updated to support thread and edge server calls.
June Park <parkjune1995@gmail.com>
parents: 6
diff changeset
26
114cad94008f [Seobeo] Updated to support thread and edge server calls.
June Park <parkjune1995@gmail.com>
parents: 6
diff changeset
27 cc_library(
67
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
28 name = "seobeo_server_macos",
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
29 srcs = [
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
30 "s_linux_network.c",
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
31 "s_web.c",
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
32 "s_ssl.c",
72
4532ce6d9eb8 [Seobeo] Added router to the server logic. Few dowa string manipulation logics.
June Park <parkjune1995@gmail.com>
parents: 67
diff changeset
33 "s_router.c",
67
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
34 "os/s_macos_edge.c",
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
35 ],
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
36 hdrs = [":seobeo_hdrs"],
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
37 deps = [
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
38 "//dowa:dowa",
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
39 ],
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
40 defines = ["SEOBEO_NO_SSL"],
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
41 target_compatible_with = [
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
42 "@platforms//os:osx",
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
43 ],
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
44 visibility = ["//visibility:public"],
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
45 )
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
46
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
47 cc_library(
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
48 name = "seobeo_server_linux",
7
114cad94008f [Seobeo] Updated to support thread and edge server calls.
June Park <parkjune1995@gmail.com>
parents: 6
diff changeset
49 srcs = [
114cad94008f [Seobeo] Updated to support thread and edge server calls.
June Park <parkjune1995@gmail.com>
parents: 6
diff changeset
50 "s_linux_network.c",
114cad94008f [Seobeo] Updated to support thread and edge server calls.
June Park <parkjune1995@gmail.com>
parents: 6
diff changeset
51 "s_web.c",
67
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
52 "s_ssl.c",
72
4532ce6d9eb8 [Seobeo] Added router to the server logic. Few dowa string manipulation logics.
June Park <parkjune1995@gmail.com>
parents: 67
diff changeset
53 "s_router.c",
67
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
54 "os/s_linux_edge.c",
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
55 ],
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
56 hdrs = [":seobeo_hdrs"],
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
57 deps = [
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
58 "//dowa:dowa",
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
59 ],
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
60 defines = ["SEOBEO_NO_SSL"],
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
61 target_compatible_with = [
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
62 "@platforms//os:linux",
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
63 ],
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
64 visibility = ["//visibility:public"],
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
65 )
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
66
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
67 # Client target with SSL support (full functionality)
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
68 alias(
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
69 name = "seobeo_client",
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
70 actual = select({
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
71 "//config:macos": ":seobeo_client_macos",
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
72 "//config:linux": ":seobeo_client_linux",
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
73 "//conditions:default": ":seobeo_client_linux",
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
74 }),
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
75 visibility = ["//visibility:public"],
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
76 )
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
77
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
78 cc_library(
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
79 name = "seobeo_client_macos",
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
80 srcs = [
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
81 "s_linux_network.c",
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
82 "s_web.c",
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
83 "s_ssl.c",
72
4532ce6d9eb8 [Seobeo] Added router to the server logic. Few dowa string manipulation logics.
June Park <parkjune1995@gmail.com>
parents: 67
diff changeset
84 "s_router.c",
67
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
85 "snapshot_creator.c",
7
114cad94008f [Seobeo] Updated to support thread and edge server calls.
June Park <parkjune1995@gmail.com>
parents: 6
diff changeset
86 "os/s_macos_edge.c",
114cad94008f [Seobeo] Updated to support thread and edge server calls.
June Park <parkjune1995@gmail.com>
parents: 6
diff changeset
87 ],
11
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents: 7
diff changeset
88 hdrs = [":seobeo_hdrs"],
18
fa2b8af609d9 [Seobeo] Fixed a bug with pathing. Support SSL.
June Park <parkjune1995@gmail.com>
parents: 17
diff changeset
89 deps = [
fa2b8af609d9 [Seobeo] Fixed a bug with pathing. Support SSL.
June Park <parkjune1995@gmail.com>
parents: 17
diff changeset
90 "//dowa:dowa",
fa2b8af609d9 [Seobeo] Fixed a bug with pathing. Support SSL.
June Park <parkjune1995@gmail.com>
parents: 17
diff changeset
91 "@openssl//:ssl",
fa2b8af609d9 [Seobeo] Fixed a bug with pathing. Support SSL.
June Park <parkjune1995@gmail.com>
parents: 17
diff changeset
92 ],
0
5695ef413be0 Initialized mono repo with bazels with few examples.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
93 target_compatible_with = [
7
114cad94008f [Seobeo] Updated to support thread and edge server calls.
June Park <parkjune1995@gmail.com>
parents: 6
diff changeset
94 "@platforms//os:osx",
0
5695ef413be0 Initialized mono repo with bazels with few examples.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
95 ],
6
1e61008b9980 [Seobeo] Updated seobeo so that API is more opinionated. Added my webpage./build.sh
June Park <parkjune1995@gmail.com>
parents: 3
diff changeset
96 visibility = ["//visibility:public"],
0
5695ef413be0 Initialized mono repo with bazels with few examples.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
97 )
1
adcfad6e86fb Updated naming and separated out some logic within seobeo.
June Park <parkjune1995@gmail.com>
parents: 0
diff changeset
98
adcfad6e86fb Updated naming and separated out some logic within seobeo.
June Park <parkjune1995@gmail.com>
parents: 0
diff changeset
99 cc_library(
67
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
100 name = "seobeo_client_linux",
1
adcfad6e86fb Updated naming and separated out some logic within seobeo.
June Park <parkjune1995@gmail.com>
parents: 0
diff changeset
101 srcs = [
adcfad6e86fb Updated naming and separated out some logic within seobeo.
June Park <parkjune1995@gmail.com>
parents: 0
diff changeset
102 "s_linux_network.c",
6
1e61008b9980 [Seobeo] Updated seobeo so that API is more opinionated. Added my webpage./build.sh
June Park <parkjune1995@gmail.com>
parents: 3
diff changeset
103 "s_web.c",
67
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
104 "s_ssl.c",
72
4532ce6d9eb8 [Seobeo] Added router to the server logic. Few dowa string manipulation logics.
June Park <parkjune1995@gmail.com>
parents: 67
diff changeset
105 "s_router.c",
67
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
106 "snapshot_creator.c",
7
114cad94008f [Seobeo] Updated to support thread and edge server calls.
June Park <parkjune1995@gmail.com>
parents: 6
diff changeset
107 "os/s_linux_edge.c",
1
adcfad6e86fb Updated naming and separated out some logic within seobeo.
June Park <parkjune1995@gmail.com>
parents: 0
diff changeset
108 ],
32
08a465eec50b [Dowa] Fixed a bug that I caused trying to stop memory leak lol.
June Park <parkjune1995@gmail.com>
parents: 31
diff changeset
109 hdrs = [":seobeo_hdrs"],
18
fa2b8af609d9 [Seobeo] Fixed a bug with pathing. Support SSL.
June Park <parkjune1995@gmail.com>
parents: 17
diff changeset
110 deps = [
fa2b8af609d9 [Seobeo] Fixed a bug with pathing. Support SSL.
June Park <parkjune1995@gmail.com>
parents: 17
diff changeset
111 "//dowa:dowa",
fa2b8af609d9 [Seobeo] Fixed a bug with pathing. Support SSL.
June Park <parkjune1995@gmail.com>
parents: 17
diff changeset
112 "@openssl//:ssl",
fa2b8af609d9 [Seobeo] Fixed a bug with pathing. Support SSL.
June Park <parkjune1995@gmail.com>
parents: 17
diff changeset
113 ],
1
adcfad6e86fb Updated naming and separated out some logic within seobeo.
June Park <parkjune1995@gmail.com>
parents: 0
diff changeset
114 target_compatible_with = [
7
114cad94008f [Seobeo] Updated to support thread and edge server calls.
June Park <parkjune1995@gmail.com>
parents: 6
diff changeset
115 "@platforms//os:linux",
1
adcfad6e86fb Updated naming and separated out some logic within seobeo.
June Park <parkjune1995@gmail.com>
parents: 0
diff changeset
116 ],
6
1e61008b9980 [Seobeo] Updated seobeo so that API is more opinionated. Added my webpage./build.sh
June Park <parkjune1995@gmail.com>
parents: 3
diff changeset
117 visibility = ["//visibility:public"],
1
adcfad6e86fb Updated naming and separated out some logic within seobeo.
June Park <parkjune1995@gmail.com>
parents: 0
diff changeset
118 )
7
114cad94008f [Seobeo] Updated to support thread and edge server calls.
June Park <parkjune1995@gmail.com>
parents: 6
diff changeset
119
67
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
120 # Default target for backward compatibility (points to client with SSL)
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
121 alias(
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
122 name = "seobeo",
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
123 actual = ":seobeo_client",
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
124 visibility = ["//visibility:public"],
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
125 )
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
126
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
127 # Tests
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
128 cc_test(
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
129 name = "seobeo_http_client_test",
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
130 srcs = ["seobeo_http_client_test.c"],
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
131 deps = [":seobeo_client"],
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
132 size = "small",
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
133 timeout = "short",
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
134 )
6626ec933933 [Seobeo] Separated out Client Server logic. Created test tools.
June Park <parkjune1995@gmail.com>
parents: 32
diff changeset
135