summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jose Colon Rodriguez2024-05-19 12:58:12 -0400
committerGravatar Jose Colon Rodriguez2024-05-19 12:58:12 -0400
commitc425c9c8511bf92e14b8b612d1d16e774b186f2e (patch)
treeba76c46a871ad77df8e10069ed92bfbc5671d2a2
parentRemoved emoji modifier display width = 0 case. (diff)
downloadzg-c425c9c8511bf92e14b8b612d1d16e774b186f2e.tar.gz
zg-c425c9c8511bf92e14b8b612d1d16e774b186f2e.tar.xz
zg-c425c9c8511bf92e14b8b612d1d16e774b186f2e.zip
Updated build.zig b.path
-rw-r--r--build.zig72
-rw-r--r--codegen/dwp.zig3
2 files changed, 36 insertions, 39 deletions
diff --git a/build.zig b/build.zig
index ad5a9bf..f178016 100644
--- a/build.zig
+++ b/build.zig
@@ -8,7 +8,7 @@ pub fn build(b: *std.Build) void {
8 // Grapheme break 8 // Grapheme break
9 const gbp_gen_exe = b.addExecutable(.{ 9 const gbp_gen_exe = b.addExecutable(.{
10 .name = "gbp", 10 .name = "gbp",
11 .root_source_file = .{ .path = "codegen/gbp.zig" }, 11 .root_source_file = b.path("codegen/gbp.zig"),
12 .target = b.host, 12 .target = b.host,
13 .optimize = .Debug, 13 .optimize = .Debug,
14 }); 14 });
@@ -22,7 +22,7 @@ pub fn build(b: *std.Build) void {
22 22
23 const dwp_gen_exe = b.addExecutable(.{ 23 const dwp_gen_exe = b.addExecutable(.{
24 .name = "dwp", 24 .name = "dwp",
25 .root_source_file = .{ .path = "codegen/dwp.zig" }, 25 .root_source_file = b.path("codegen/dwp.zig"),
26 .target = b.host, 26 .target = b.host,
27 .optimize = .Debug, 27 .optimize = .Debug,
28 }); 28 });
@@ -33,7 +33,7 @@ pub fn build(b: *std.Build) void {
33 // Normalization properties 33 // Normalization properties
34 const canon_gen_exe = b.addExecutable(.{ 34 const canon_gen_exe = b.addExecutable(.{
35 .name = "canon", 35 .name = "canon",
36 .root_source_file = .{ .path = "codegen/canon.zig" }, 36 .root_source_file = b.path("codegen/canon.zig"),
37 .target = b.host, 37 .target = b.host,
38 .optimize = .Debug, 38 .optimize = .Debug,
39 }); 39 });
@@ -42,7 +42,7 @@ pub fn build(b: *std.Build) void {
42 42
43 const compat_gen_exe = b.addExecutable(.{ 43 const compat_gen_exe = b.addExecutable(.{
44 .name = "compat", 44 .name = "compat",
45 .root_source_file = .{ .path = "codegen/compat.zig" }, 45 .root_source_file = b.path("codegen/compat.zig"),
46 .target = b.host, 46 .target = b.host,
47 .optimize = .Debug, 47 .optimize = .Debug,
48 }); 48 });
@@ -51,7 +51,7 @@ pub fn build(b: *std.Build) void {
51 51
52 const hangul_gen_exe = b.addExecutable(.{ 52 const hangul_gen_exe = b.addExecutable(.{
53 .name = "hangul", 53 .name = "hangul",
54 .root_source_file = .{ .path = "codegen/hangul.zig" }, 54 .root_source_file = b.path("codegen/hangul.zig"),
55 .target = b.host, 55 .target = b.host,
56 .optimize = .Debug, 56 .optimize = .Debug,
57 }); 57 });
@@ -60,7 +60,7 @@ pub fn build(b: *std.Build) void {
60 60
61 const normp_gen_exe = b.addExecutable(.{ 61 const normp_gen_exe = b.addExecutable(.{
62 .name = "normp", 62 .name = "normp",
63 .root_source_file = .{ .path = "codegen/normp.zig" }, 63 .root_source_file = b.path("codegen/normp.zig"),
64 .target = b.host, 64 .target = b.host,
65 .optimize = .Debug, 65 .optimize = .Debug,
66 }); 66 });
@@ -69,7 +69,7 @@ pub fn build(b: *std.Build) void {
69 69
70 const ccc_gen_exe = b.addExecutable(.{ 70 const ccc_gen_exe = b.addExecutable(.{
71 .name = "ccc", 71 .name = "ccc",
72 .root_source_file = .{ .path = "codegen/ccc.zig" }, 72 .root_source_file = b.path("codegen/ccc.zig"),
73 .target = b.host, 73 .target = b.host,
74 .optimize = .Debug, 74 .optimize = .Debug,
75 }); 75 });
@@ -78,7 +78,7 @@ pub fn build(b: *std.Build) void {
78 78
79 const gencat_gen_exe = b.addExecutable(.{ 79 const gencat_gen_exe = b.addExecutable(.{
80 .name = "gencat", 80 .name = "gencat",
81 .root_source_file = .{ .path = "codegen/gencat.zig" }, 81 .root_source_file = b.path("codegen/gencat.zig"),
82 .target = b.host, 82 .target = b.host,
83 .optimize = .Debug, 83 .optimize = .Debug,
84 }); 84 });
@@ -87,7 +87,7 @@ pub fn build(b: *std.Build) void {
87 87
88 const fold_gen_exe = b.addExecutable(.{ 88 const fold_gen_exe = b.addExecutable(.{
89 .name = "fold", 89 .name = "fold",
90 .root_source_file = .{ .path = "codegen/fold.zig" }, 90 .root_source_file = b.path("codegen/fold.zig"),
91 .target = b.host, 91 .target = b.host,
92 .optimize = .Debug, 92 .optimize = .Debug,
93 }); 93 });
@@ -97,7 +97,7 @@ pub fn build(b: *std.Build) void {
97 // Numeric types 97 // Numeric types
98 const num_gen_exe = b.addExecutable(.{ 98 const num_gen_exe = b.addExecutable(.{
99 .name = "numeric", 99 .name = "numeric",
100 .root_source_file = .{ .path = "codegen/numeric.zig" }, 100 .root_source_file = b.path("codegen/numeric.zig"),
101 .target = b.host, 101 .target = b.host,
102 .optimize = .Debug, 102 .optimize = .Debug,
103 }); 103 });
@@ -107,7 +107,7 @@ pub fn build(b: *std.Build) void {
107 // Letter case properties 107 // Letter case properties
108 const case_prop_gen_exe = b.addExecutable(.{ 108 const case_prop_gen_exe = b.addExecutable(.{
109 .name = "case_prop", 109 .name = "case_prop",
110 .root_source_file = .{ .path = "codegen/case_prop.zig" }, 110 .root_source_file = b.path("codegen/case_prop.zig"),
111 .target = b.host, 111 .target = b.host,
112 .optimize = .Debug, 112 .optimize = .Debug,
113 }); 113 });
@@ -117,7 +117,7 @@ pub fn build(b: *std.Build) void {
117 // Uppercase mappings 117 // Uppercase mappings
118 const upper_gen_exe = b.addExecutable(.{ 118 const upper_gen_exe = b.addExecutable(.{
119 .name = "upper", 119 .name = "upper",
120 .root_source_file = .{ .path = "codegen/upper.zig" }, 120 .root_source_file = b.path("codegen/upper.zig"),
121 .target = b.host, 121 .target = b.host,
122 .optimize = .Debug, 122 .optimize = .Debug,
123 }); 123 });
@@ -127,7 +127,7 @@ pub fn build(b: *std.Build) void {
127 // Lowercase mappings 127 // Lowercase mappings
128 const lower_gen_exe = b.addExecutable(.{ 128 const lower_gen_exe = b.addExecutable(.{
129 .name = "lower", 129 .name = "lower",
130 .root_source_file = .{ .path = "codegen/lower.zig" }, 130 .root_source_file = b.path("codegen/lower.zig"),
131 .target = b.host, 131 .target = b.host,
132 .optimize = .Debug, 132 .optimize = .Debug,
133 }); 133 });
@@ -136,7 +136,7 @@ pub fn build(b: *std.Build) void {
136 136
137 const scripts_gen_exe = b.addExecutable(.{ 137 const scripts_gen_exe = b.addExecutable(.{
138 .name = "scripts", 138 .name = "scripts",
139 .root_source_file = .{ .path = "codegen/scripts.zig" }, 139 .root_source_file = b.path("codegen/scripts.zig"),
140 .target = b.host, 140 .target = b.host,
141 .optimize = .Debug, 141 .optimize = .Debug,
142 }); 142 });
@@ -145,7 +145,7 @@ pub fn build(b: *std.Build) void {
145 145
146 const core_gen_exe = b.addExecutable(.{ 146 const core_gen_exe = b.addExecutable(.{
147 .name = "core", 147 .name = "core",
148 .root_source_file = .{ .path = "codegen/core_props.zig" }, 148 .root_source_file = b.path("codegen/core_props.zig"),
149 .target = b.host, 149 .target = b.host,
150 .optimize = .Debug, 150 .optimize = .Debug,
151 }); 151 });
@@ -154,7 +154,7 @@ pub fn build(b: *std.Build) void {
154 154
155 const props_gen_exe = b.addExecutable(.{ 155 const props_gen_exe = b.addExecutable(.{
156 .name = "props", 156 .name = "props",
157 .root_source_file = .{ .path = "codegen/props.zig" }, 157 .root_source_file = b.path("codegen/props.zig"),
158 .target = b.host, 158 .target = b.host,
159 .optimize = .Debug, 159 .optimize = .Debug,
160 }); 160 });
@@ -164,21 +164,21 @@ pub fn build(b: *std.Build) void {
164 // Modules we provide 164 // Modules we provide
165 // Code points 165 // Code points
166 const code_point = b.addModule("code_point", .{ 166 const code_point = b.addModule("code_point", .{
167 .root_source_file = .{ .path = "src/code_point.zig" }, 167 .root_source_file = b.path("src/code_point.zig"),
168 .target = target, 168 .target = target,
169 .optimize = optimize, 169 .optimize = optimize,
170 }); 170 });
171 171
172 // Grapheme clusters 172 // Grapheme clusters
173 const grapheme_data = b.createModule(.{ 173 const grapheme_data = b.createModule(.{
174 .root_source_file = .{ .path = "src/GraphemeData.zig" }, 174 .root_source_file = b.path("src/GraphemeData.zig"),
175 .target = target, 175 .target = target,
176 .optimize = optimize, 176 .optimize = optimize,
177 }); 177 });
178 grapheme_data.addAnonymousImport("gbp", .{ .root_source_file = gbp_gen_out }); 178 grapheme_data.addAnonymousImport("gbp", .{ .root_source_file = gbp_gen_out });
179 179
180 const grapheme = b.addModule("grapheme", .{ 180 const grapheme = b.addModule("grapheme", .{
181 .root_source_file = .{ .path = "src/grapheme.zig" }, 181 .root_source_file = b.path("src/grapheme.zig"),
182 .target = target, 182 .target = target,
183 .optimize = optimize, 183 .optimize = optimize,
184 }); 184 });
@@ -187,14 +187,14 @@ pub fn build(b: *std.Build) void {
187 187
188 // ASCII utilities 188 // ASCII utilities
189 const ascii = b.addModule("ascii", .{ 189 const ascii = b.addModule("ascii", .{
190 .root_source_file = .{ .path = "src/ascii.zig" }, 190 .root_source_file = b.path("src/ascii.zig"),
191 .target = target, 191 .target = target,
192 .optimize = optimize, 192 .optimize = optimize,
193 }); 193 });
194 194
195 // Fixed pitch font display width 195 // Fixed pitch font display width
196 const width_data = b.createModule(.{ 196 const width_data = b.createModule(.{
197 .root_source_file = .{ .path = "src/WidthData.zig" }, 197 .root_source_file = b.path("src/WidthData.zig"),
198 .target = target, 198 .target = target,
199 .optimize = optimize, 199 .optimize = optimize,
200 }); 200 });
@@ -202,7 +202,7 @@ pub fn build(b: *std.Build) void {
202 width_data.addImport("GraphemeData", grapheme_data); 202 width_data.addImport("GraphemeData", grapheme_data);
203 203
204 const display_width = b.addModule("DisplayWidth", .{ 204 const display_width = b.addModule("DisplayWidth", .{
205 .root_source_file = .{ .path = "src/DisplayWidth.zig" }, 205 .root_source_file = b.path("src/DisplayWidth.zig"),
206 .target = target, 206 .target = target,
207 .optimize = optimize, 207 .optimize = optimize,
208 }); 208 });
@@ -213,42 +213,42 @@ pub fn build(b: *std.Build) void {
213 213
214 // Normalization 214 // Normalization
215 const ccc_data = b.createModule(.{ 215 const ccc_data = b.createModule(.{
216 .root_source_file = .{ .path = "src/CombiningData.zig" }, 216 .root_source_file = b.path("src/CombiningData.zig"),
217 .target = target, 217 .target = target,
218 .optimize = optimize, 218 .optimize = optimize,
219 }); 219 });
220 ccc_data.addAnonymousImport("ccc", .{ .root_source_file = ccc_gen_out }); 220 ccc_data.addAnonymousImport("ccc", .{ .root_source_file = ccc_gen_out });
221 221
222 const canon_data = b.createModule(.{ 222 const canon_data = b.createModule(.{
223 .root_source_file = .{ .path = "src/CanonData.zig" }, 223 .root_source_file = b.path("src/CanonData.zig"),
224 .target = target, 224 .target = target,
225 .optimize = optimize, 225 .optimize = optimize,
226 }); 226 });
227 canon_data.addAnonymousImport("canon", .{ .root_source_file = canon_gen_out }); 227 canon_data.addAnonymousImport("canon", .{ .root_source_file = canon_gen_out });
228 228
229 const compat_data = b.createModule(.{ 229 const compat_data = b.createModule(.{
230 .root_source_file = .{ .path = "src/CompatData.zig" }, 230 .root_source_file = b.path("src/CompatData.zig"),
231 .target = target, 231 .target = target,
232 .optimize = optimize, 232 .optimize = optimize,
233 }); 233 });
234 compat_data.addAnonymousImport("compat", .{ .root_source_file = compat_gen_out }); 234 compat_data.addAnonymousImport("compat", .{ .root_source_file = compat_gen_out });
235 235
236 const hangul_data = b.createModule(.{ 236 const hangul_data = b.createModule(.{
237 .root_source_file = .{ .path = "src/HangulData.zig" }, 237 .root_source_file = b.path("src/HangulData.zig"),
238 .target = target, 238 .target = target,
239 .optimize = optimize, 239 .optimize = optimize,
240 }); 240 });
241 hangul_data.addAnonymousImport("hangul", .{ .root_source_file = hangul_gen_out }); 241 hangul_data.addAnonymousImport("hangul", .{ .root_source_file = hangul_gen_out });
242 242
243 const normp_data = b.createModule(.{ 243 const normp_data = b.createModule(.{
244 .root_source_file = .{ .path = "src/NormPropsData.zig" }, 244 .root_source_file = b.path("src/NormPropsData.zig"),
245 .target = target, 245 .target = target,
246 .optimize = optimize, 246 .optimize = optimize,
247 }); 247 });
248 normp_data.addAnonymousImport("normp", .{ .root_source_file = normp_gen_out }); 248 normp_data.addAnonymousImport("normp", .{ .root_source_file = normp_gen_out });
249 249
250 const norm_data = b.createModule(.{ 250 const norm_data = b.createModule(.{
251 .root_source_file = .{ .path = "src/NormData.zig" }, 251 .root_source_file = b.path("src/NormData.zig"),
252 .target = target, 252 .target = target,
253 .optimize = optimize, 253 .optimize = optimize,
254 }); 254 });
@@ -259,7 +259,7 @@ pub fn build(b: *std.Build) void {
259 norm_data.addImport("NormPropsData", normp_data); 259 norm_data.addImport("NormPropsData", normp_data);
260 260
261 const norm = b.addModule("Normalize", .{ 261 const norm = b.addModule("Normalize", .{
262 .root_source_file = .{ .path = "src/Normalize.zig" }, 262 .root_source_file = b.path("src/Normalize.zig"),
263 .target = target, 263 .target = target,
264 .optimize = optimize, 264 .optimize = optimize,
265 }); 265 });
@@ -269,7 +269,7 @@ pub fn build(b: *std.Build) void {
269 269
270 // General Category 270 // General Category
271 const gencat_data = b.addModule("GenCatData", .{ 271 const gencat_data = b.addModule("GenCatData", .{
272 .root_source_file = .{ .path = "src/GenCatData.zig" }, 272 .root_source_file = b.path("src/GenCatData.zig"),
273 .target = target, 273 .target = target,
274 .optimize = optimize, 274 .optimize = optimize,
275 }); 275 });
@@ -277,14 +277,14 @@ pub fn build(b: *std.Build) void {
277 277
278 // Case folding 278 // Case folding
279 const fold_data = b.createModule(.{ 279 const fold_data = b.createModule(.{
280 .root_source_file = .{ .path = "src/FoldData.zig" }, 280 .root_source_file = b.path("src/FoldData.zig"),
281 .target = target, 281 .target = target,
282 .optimize = optimize, 282 .optimize = optimize,
283 }); 283 });
284 fold_data.addAnonymousImport("fold", .{ .root_source_file = fold_gen_out }); 284 fold_data.addAnonymousImport("fold", .{ .root_source_file = fold_gen_out });
285 285
286 const case_fold = b.addModule("CaseFold", .{ 286 const case_fold = b.addModule("CaseFold", .{
287 .root_source_file = .{ .path = "src/CaseFold.zig" }, 287 .root_source_file = b.path("src/CaseFold.zig"),
288 .target = target, 288 .target = target,
289 .optimize = optimize, 289 .optimize = optimize,
290 }); 290 });
@@ -294,7 +294,7 @@ pub fn build(b: *std.Build) void {
294 294
295 // Letter case 295 // Letter case
296 const case_data = b.addModule("CaseData", .{ 296 const case_data = b.addModule("CaseData", .{
297 .root_source_file = .{ .path = "src/CaseData.zig" }, 297 .root_source_file = b.path("src/CaseData.zig"),
298 .target = target, 298 .target = target,
299 .optimize = optimize, 299 .optimize = optimize,
300 }); 300 });
@@ -305,7 +305,7 @@ pub fn build(b: *std.Build) void {
305 305
306 // Scripts 306 // Scripts
307 const scripts_data = b.addModule("ScriptsData", .{ 307 const scripts_data = b.addModule("ScriptsData", .{
308 .root_source_file = .{ .path = "src/ScriptsData.zig" }, 308 .root_source_file = b.path("src/ScriptsData.zig"),
309 .target = target, 309 .target = target,
310 .optimize = optimize, 310 .optimize = optimize,
311 }); 311 });
@@ -313,7 +313,7 @@ pub fn build(b: *std.Build) void {
313 313
314 // Properties 314 // Properties
315 const props_data = b.addModule("PropsData", .{ 315 const props_data = b.addModule("PropsData", .{
316 .root_source_file = .{ .path = "src/PropsData.zig" }, 316 .root_source_file = b.path("src/PropsData.zig"),
317 .target = target, 317 .target = target,
318 .optimize = optimize, 318 .optimize = optimize,
319 }); 319 });
@@ -323,7 +323,7 @@ pub fn build(b: *std.Build) void {
323 323
324 // Unicode Tests 324 // Unicode Tests
325 const unicode_tests = b.addTest(.{ 325 const unicode_tests = b.addTest(.{
326 .root_source_file = .{ .path = "src/unicode_tests.zig" }, 326 .root_source_file = b.path("src/unicode_tests.zig"),
327 .target = target, 327 .target = target,
328 .optimize = optimize, 328 .optimize = optimize,
329 }); 329 });
diff --git a/codegen/dwp.zig b/codegen/dwp.zig
index b083ce4..c581eb6 100644
--- a/codegen/dwp.zig
+++ b/codegen/dwp.zig
@@ -178,9 +178,6 @@ pub fn main() !void {
178 0x2060...0x206f, 178 0x2060...0x206f,
179 0xfff0...0xfff8, 179 0xfff0...0xfff8,
180 0xe0000...0xE0fff, 180 0xe0000...0xE0fff,
181
182 // Sk with EMOJI MODIFIER comment
183 // 0x1f3fb...0x1f3ff,
184 => width = 0, 181 => width = 0,
185 182
186 // Two-em dash 183 // Two-em dash