usearch 2.8.7 → 2.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/CITATION.cff +1 -1
  2. package/CMakeLists.txt +3 -3
  3. package/CONTRIBUTING.md +26 -3
  4. package/Cargo.toml +1 -1
  5. package/Dockerfile +16 -0
  6. package/README.md +41 -38
  7. package/VERSION +1 -0
  8. package/binding.gyp +57 -8
  9. package/conanfile.py +1 -1
  10. package/include/usearch/index.hpp +1 -1
  11. package/include/usearch/index_plugins.hpp +28 -24
  12. package/javascript/README.md +64 -12
  13. package/javascript/lib.cpp +11 -3
  14. package/javascript/usearch.js +4 -2
  15. package/javascript/usearch.test.js +15 -0
  16. package/package.json +1 -2
  17. package/setup.py +76 -15
  18. package/simsimd/README.md +14 -13
  19. package/simsimd/include/simsimd/probability.h +2 -2
  20. package/simsimd/package.json +1 -1
  21. package/wasmer.toml +1 -1
  22. package/. npmignore +0 -14
  23. package/.gitignore +0 -95
  24. package/.vscode/launch.json +0 -181
  25. package/.vscode/settings.json +0 -180
  26. package/.vscode/tasks.json +0 -71
  27. package/Package.swift +0 -41
  28. package/csharp/.editorconfig +0 -361
  29. package/csharp/Cloud.Unum.USearch.sln +0 -34
  30. package/csharp/DEV_SETUP.md +0 -51
  31. package/csharp/Directory.Build.props +0 -29
  32. package/csharp/README.md +0 -74
  33. package/csharp/build_and_test.cmd +0 -31
  34. package/csharp/build_and_test.sh +0 -30
  35. package/csharp/nuget/nuget-package.props +0 -33
  36. package/csharp/pack.sh +0 -56
  37. package/csharp/src/Cloud.Unum.USearch.Tests/Cloud.Unum.USearch.Tests.csproj +0 -39
  38. package/csharp/src/Cloud.Unum.USearch.Tests/USearchIndexTests.cs +0 -1013
  39. package/csharp/src/Cloud.Unum.USearch.Tests/Usings.cs +0 -1
  40. package/docs/_static/custom.css +0 -26
  41. package/docs/_static/custom.js +0 -7
  42. package/docs/benchmarks.md +0 -245
  43. package/docs/benchmarks.rst +0 -5
  44. package/docs/c/index.rst +0 -11
  45. package/docs/c/reference.rst +0 -7
  46. package/docs/conf.dox +0 -2668
  47. package/docs/conf.py +0 -53
  48. package/docs/contributing.rst +0 -5
  49. package/docs/cpp/index.rst +0 -11
  50. package/docs/cpp/reference.rst +0 -17
  51. package/docs/csharp/index.rst +0 -6
  52. package/docs/format.md +0 -86
  53. package/docs/format.rst +0 -5
  54. package/docs/golang/index.rst +0 -6
  55. package/docs/index.rst +0 -33
  56. package/docs/java/index.rst +0 -11
  57. package/docs/java/reference.rst +0 -7
  58. package/docs/javascript/index.rst +0 -11
  59. package/docs/javascript/reference.rst +0 -12
  60. package/docs/python/index.rst +0 -11
  61. package/docs/python/reference.rst +0 -42
  62. package/docs/rust/index.rst +0 -6
  63. package/docs/swift/index.rst +0 -6
  64. package/docs/wolfram/index.rst +0 -6
  65. package/golang/README.md +0 -95
  66. package/golang/go.mod +0 -3
  67. package/golang/lib.go +0 -379
  68. package/golang/lib_test.go +0 -108
  69. package/java/README.md +0 -22
  70. package/java/cloud/unum/usearch/Index.java +0 -337
  71. package/java/cloud/unum/usearch/cloud_unum_usearch_Index.cpp +0 -197
  72. package/java/cloud/unum/usearch/cloud_unum_usearch_Index.h +0 -125
  73. package/java/test/IndexTest.java +0 -30
  74. package/objc/USearchObjective.mm +0 -299
  75. package/objc/include/USearchObjective.h +0 -154
  76. package/python/README.md +0 -292
  77. package/python/lib.cpp +0 -1216
  78. package/python/scripts/bench.ipynb +0 -193
  79. package/python/scripts/bench.py +0 -137
  80. package/python/scripts/bench_exact.py +0 -44
  81. package/python/scripts/cluster.ipynb +0 -160
  82. package/python/scripts/index_faiss.py +0 -100
  83. package/python/scripts/join.py +0 -155
  84. package/python/scripts/test_index.py +0 -247
  85. package/python/scripts/test_jit.py +0 -231
  86. package/python/scripts/test_sparse.py +0 -32
  87. package/python/scripts/test_tooling.py +0 -133
  88. package/python/usearch/__init__.py +0 -0
  89. package/python/usearch/client.py +0 -124
  90. package/python/usearch/eval.py +0 -470
  91. package/python/usearch/index.py +0 -1401
  92. package/python/usearch/io.py +0 -113
  93. package/python/usearch/numba.py +0 -121
  94. package/python/usearch/server.py +0 -137
  95. package/rust/README.md +0 -66
  96. package/rust/lib.cpp +0 -136
  97. package/rust/lib.hpp +0 -69
  98. package/rust/lib.rs +0 -610
  99. package/simsimd/CMakeLists.txt +0 -67
  100. package/simsimd/cpp/bench.cxx +0 -206
  101. package/simsimd/package-ci.json +0 -10
  102. package/simsimd/setup.py +0 -86
  103. package/swift/Index+Sugar.swift +0 -153
  104. package/swift/README.md +0 -48
  105. package/swift/Test.swift +0 -37
  106. package/swift/USearch.swift +0 -8
  107. package/wasm/CMakeLists.txt +0 -7
  108. package/wasm/README.md +0 -13
  109. package/wasm/lib.cpp +0 -5
  110. package/wolfram/CMakeLists.txt +0 -18
  111. package/wolfram/README.md +0 -13
  112. package/wolfram/lib.cpp +0 -160
  113. package/wolfram/test.wls +0 -27
@@ -1,361 +0,0 @@
1
- # To learn more about .editorconfig see https://aka.ms/editorconfigdocs
2
- ###############################
3
- # Core EditorConfig Options #
4
- ###############################
5
- root = true
6
-
7
- # XML project files
8
- [*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
9
- indent_size = 2
10
-
11
- # XML config files
12
- [*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
13
- indent_size = 2
14
-
15
- # YAML config files
16
- [*.{yml,yaml}]
17
- tab_width = 2
18
- indent_size = 2
19
- insert_final_newline = true
20
- trim_trailing_whitespace = true
21
-
22
- # JSON config files
23
- [*.json]
24
- tab_width = 2
25
- indent_size = 2
26
- insert_final_newline = false
27
- trim_trailing_whitespace = true
28
-
29
- # Typescript files
30
- [*.{ts,tsx}]
31
- insert_final_newline = true
32
- trim_trailing_whitespace = true
33
- tab_width = 4
34
- indent_size = 4
35
-
36
- # Stylesheet files
37
- [*.{css,scss,sass,less}]
38
- insert_final_newline = true
39
- trim_trailing_whitespace = true
40
- tab_width = 4
41
- indent_size = 4
42
-
43
- # Code files
44
- [*.{cs,csx,vb,vbx}]
45
- indent_style = space
46
- end_of_line = lf
47
- tab_width = 4
48
- indent_size = 4
49
- insert_final_newline = true
50
- trim_trailing_whitespace = true
51
- charset = utf-8-bom
52
-
53
- ###############################
54
- # .NET Coding Conventions #
55
- ###############################
56
- [*.{cs,vb}]
57
- # Organize usings
58
- dotnet_sort_system_directives_first = true
59
- # this. preferences
60
- dotnet_style_qualification_for_field = true:error
61
- dotnet_style_qualification_for_property = true:error
62
- dotnet_style_qualification_for_method = true:error
63
- dotnet_style_qualification_for_event = true:error
64
- # Language keywords vs BCL types preferences
65
- dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
66
- dotnet_style_predefined_type_for_member_access = true:suggestion
67
- # Parentheses preferences
68
- dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:suggestion
69
- dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:suggestion
70
- dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
71
- dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
72
- # Modifier preferences
73
- dotnet_style_require_accessibility_modifiers = for_non_interface_members:error
74
- dotnet_style_readonly_field = true:suggestion
75
- # Expression-level preferences
76
- dotnet_style_object_initializer = true:suggestion
77
- dotnet_style_collection_initializer = true:suggestion
78
- dotnet_style_explicit_tuple_names = true:suggestion
79
- dotnet_style_null_propagation = true:suggestion
80
- dotnet_style_coalesce_expression = true:suggestion
81
- dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
82
- dotnet_style_prefer_inferred_tuple_names = true:suggestion
83
- dotnet_style_prefer_inferred_anonymous_type_member_names = true:silent
84
- dotnet_style_prefer_auto_properties = true:suggestion
85
- dotnet_style_prefer_conditional_expression_over_assignment = true:silent
86
- dotnet_style_prefer_conditional_expression_over_return = true:silent
87
- dotnet_style_prefer_simplified_interpolation = true:suggestion
88
- dotnet_style_operator_placement_when_wrapping = beginning_of_line
89
- dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
90
- dotnet_style_prefer_compound_assignment = true:suggestion
91
- # Code quality rules
92
- dotnet_code_quality_unused_parameters = all:suggestion
93
-
94
- # TODO: enable this but stop "dotnet format" from applying incorrect fixes and introducing a lot of unwanted changes.
95
- dotnet_analyzer_diagnostic.severity = none
96
-
97
- # Note: these settings cause "dotnet format" to fix the code. You should review each change if you uses "dotnet format".
98
- dotnet_diagnostic.RCS1036.severity = warning # Remove unnecessary blank line.
99
- dotnet_diagnostic.RCS1037.severity = warning # Remove trailing white-space.
100
- dotnet_diagnostic.RCS1097.severity = warning # Remove redundant 'ToString' call.
101
- dotnet_diagnostic.RCS1138.severity = warning # Add summary to documentation comment.
102
- dotnet_diagnostic.RCS1139.severity = warning # Add summary element to documentation comment.
103
- dotnet_diagnostic.RCS1168.severity = warning # Parameter name 'foo' differs from base name 'bar'.
104
- dotnet_diagnostic.RCS1175.severity = warning # Unused 'this' parameter 'operation'.
105
- dotnet_diagnostic.RCS1192.severity = warning # Unnecessary usage of verbatim string literal.
106
- dotnet_diagnostic.RCS1194.severity = warning # Implement exception constructors.
107
- dotnet_diagnostic.RCS1211.severity = warning # Remove unnecessary else clause.
108
- dotnet_diagnostic.RCS1214.severity = warning # Unnecessary interpolated string.
109
- dotnet_diagnostic.RCS1225.severity = warning # Make class sealed.
110
- dotnet_diagnostic.RCS1232.severity = warning # Order elements in documentation comment.
111
-
112
- # Diagnostics elevated as warnings
113
- dotnet_diagnostic.CA1000.severity = warning # Do not declare static members on generic types
114
- dotnet_diagnostic.CA1031.severity = warning # Do not catch general exception types
115
- dotnet_diagnostic.CA1050.severity = warning # Declare types in namespaces
116
- dotnet_diagnostic.CA1063.severity = warning # Implement IDisposable correctly
117
- dotnet_diagnostic.CA1064.severity = warning # Exceptions should be public
118
- dotnet_diagnostic.CA1303.severity = warning # Do not pass literals as localized parameters
119
- dotnet_diagnostic.CA1416.severity = warning # Validate platform compatibility
120
- dotnet_diagnostic.CA1508.severity = warning # Avoid dead conditional code
121
- dotnet_diagnostic.CS1591.severity = warning # Missing XML comment for publicly visible type or member
122
- dotnet_diagnostic.CA1852.severity = warning # Sealed classes
123
- dotnet_diagnostic.CA1859.severity = warning # Use concrete types when possible for improved performance
124
- dotnet_diagnostic.CA1860.severity = warning # Prefer comparing 'Count' to 0 rather than using 'Any()', both for clarity and for performance
125
- dotnet_diagnostic.CA2000.severity = warning # Call System.IDisposable.Dispose on object before all references to it are out of scope
126
- dotnet_diagnostic.CA2007.severity = error # Do not directly await a Task
127
- dotnet_diagnostic.CA2201.severity = warning # Exception type System.Exception is not sufficiently specific
128
- dotnet_diagnostic.CA2225.severity = warning # Operator overloads have named alternates
129
-
130
- dotnet_diagnostic.IDE0001.severity = warning # Simplify name
131
- dotnet_diagnostic.IDE0005.severity = warning # Remove unnecessary using directives
132
- dotnet_diagnostic.IDE1006.severity = warning # Code style errors, e.g. dotnet_naming_rule rules violations
133
- dotnet_diagnostic.IDE0009.severity = warning # Add this or Me qualification
134
- dotnet_diagnostic.IDE0011.severity = warning # Add braces
135
- dotnet_diagnostic.IDE0018.severity = warning # Inline variable declaration
136
- dotnet_diagnostic.IDE0032.severity = warning # Use auto-implemented property
137
- dotnet_diagnostic.IDE0034.severity = warning # Simplify 'default' expression
138
- dotnet_diagnostic.IDE0035.severity = warning # Remove unreachable code
139
- dotnet_diagnostic.IDE0040.severity = warning # Add accessibility modifiers
140
- dotnet_diagnostic.IDE0049.severity = warning # Use language keywords instead of framework type names for type references
141
- dotnet_diagnostic.IDE0050.severity = warning # Convert anonymous type to tuple
142
- dotnet_diagnostic.IDE0051.severity = warning # Remove unused private member
143
- dotnet_diagnostic.IDE0055.severity = warning # Formatting rule
144
- dotnet_diagnostic.IDE0060.severity = warning # Remove unused parameter
145
- dotnet_diagnostic.IDE0070.severity = warning # Use 'System.HashCode.Combine'
146
- dotnet_diagnostic.IDE0071.severity = warning # Simplify interpolation
147
- dotnet_diagnostic.IDE0073.severity = warning # Require file header
148
- dotnet_diagnostic.IDE0082.severity = warning # Convert typeof to nameof
149
- dotnet_diagnostic.IDE0090.severity = warning # Simplify new expression
150
- dotnet_diagnostic.IDE0130.severity = warning # Namespace does not match folder structure
151
- dotnet_diagnostic.IDE0161.severity = warning # Use file-scoped namespace
152
-
153
- dotnet_diagnostic.RCS1032.severity = warning # Remove redundant parentheses.
154
- dotnet_diagnostic.RCS1118.severity = warning # Mark local variable as const.
155
- dotnet_diagnostic.RCS1141.severity = warning # Add 'param' element to documentation comment.
156
- dotnet_diagnostic.RCS1197.severity = warning # Optimize StringBuilder.AppendLine call.
157
- dotnet_diagnostic.RCS1205.severity = warning # Order named arguments according to the order of parameters.
158
- dotnet_diagnostic.RCS1229.severity = warning # Use async/await when necessary.
159
-
160
- dotnet_diagnostic.VSTHRD111.severity = error # Use .ConfigureAwait(bool)
161
-
162
- # Suppressed diagnostics
163
-
164
- # Commented out because `dotnet format` change can be disruptive.
165
- # dotnet_diagnostic.RCS1085.severity = warning # Use auto-implemented property.
166
-
167
- # Commented out because `dotnet format` removes the xmldoc element, while we should add the missing documentation instead.
168
- # dotnet_diagnostic.RCS1228.severity = warning # Unused element in documentation comment.
169
-
170
- dotnet_diagnostic.CA1002.severity = none # Change 'List<string>' in '...' to use 'Collection<T>' ...
171
- dotnet_diagnostic.CA1032.severity = none # We're using RCS1194 which seems to cover more ctors
172
- dotnet_diagnostic.CA1034.severity = none # Do not nest type. Alternatively, change its accessibility so that it is not externally visible
173
- dotnet_diagnostic.CA1054.severity = none # URI parameters should not be strings
174
- dotnet_diagnostic.CA1062.severity = none # Disable null check, C# already does it for us
175
- dotnet_diagnostic.CA1805.severity = none # Member is explicitly initialized to its default value
176
- dotnet_diagnostic.CA1822.severity = none # Member does not access instance data and can be marked as static
177
- dotnet_diagnostic.CA1848.severity = none # For improved performance, use the LoggerMessage delegates
178
- dotnet_diagnostic.CA2227.severity = none # Change to be read-only by removing the property setter
179
- dotnet_diagnostic.CA2253.severity = none # Named placeholders in the logging message template should not be comprised of only numeric characters
180
- dotnet_diagnostic.RCS1021.severity = none # Use expression-bodied lambda.
181
- dotnet_diagnostic.RCS1061.severity = none # Merge 'if' with nested 'if'.
182
- dotnet_diagnostic.RCS1069.severity = none # Remove unnecessary case label.
183
- dotnet_diagnostic.RCS1074.severity = none # Remove redundant constructor.
184
- dotnet_diagnostic.RCS1077.severity = none # Optimize LINQ method call.
185
- dotnet_diagnostic.RCS1124.severity = none # Inline local variable.
186
- dotnet_diagnostic.RCS1129.severity = none # Remove redundant field initialization.
187
- dotnet_diagnostic.RCS1140.severity = none # Add exception to documentation comment.
188
- dotnet_diagnostic.RCS1142.severity = none # Add 'typeparam' element to documentation comment.
189
- dotnet_diagnostic.RCS1146.severity = none # Use conditional access.
190
- dotnet_diagnostic.RCS1151.severity = none # Remove redundant cast.
191
- dotnet_diagnostic.RCS1158.severity = none # Static member in generic type should use a type parameter.
192
- dotnet_diagnostic.RCS1161.severity = none # Enum should declare explicit value
193
- dotnet_diagnostic.RCS1163.severity = none # Unused parameter 'foo'.
194
- dotnet_diagnostic.RCS1170.severity = none # Use read-only auto-implemented property.
195
- dotnet_diagnostic.RCS1173.severity = none # Use coalesce expression instead of 'if'.
196
- dotnet_diagnostic.RCS1181.severity = none # Convert comment to documentation comment.
197
- dotnet_diagnostic.RCS1186.severity = none # Use Regex instance instead of static method.
198
- dotnet_diagnostic.RCS1188.severity = none # Remove redundant auto-property initialization.
199
- dotnet_diagnostic.RCS1189.severity = none # Add region name to #endregion.
200
- dotnet_diagnostic.RCS1201.severity = none # Use method chaining.
201
- dotnet_diagnostic.RCS1212.severity = none # Remove redundant assignment.
202
- dotnet_diagnostic.RCS1217.severity = none # Convert interpolated string to concatenation.
203
- dotnet_diagnostic.RCS1222.severity = none # Merge preprocessor directives.
204
- dotnet_diagnostic.RCS1226.severity = none # Add paragraph to documentation comment.
205
- dotnet_diagnostic.RCS1234.severity = none # Enum duplicate value
206
- dotnet_diagnostic.RCS1238.severity = none # Avoid nested ?: operators.
207
- dotnet_diagnostic.RCS1241.severity = none # Implement IComparable when implementing IComparable<T><T>.
208
- dotnet_diagnostic.IDE0001.severity = none # Simplify name
209
- dotnet_diagnostic.IDE0002.severity = none # Simplify member access
210
- dotnet_diagnostic.IDE0004.severity = none # Remove unnecessary cast
211
- dotnet_diagnostic.IDE0035.severity = none # Remove unreachable code
212
- dotnet_diagnostic.IDE0051.severity = none # Remove unused private member
213
- dotnet_diagnostic.IDE0052.severity = none # Remove unread private member
214
- dotnet_diagnostic.IDE0058.severity = none # Remove unused expression value
215
- dotnet_diagnostic.IDE0059.severity = none # Unnecessary assignment of a value
216
- dotnet_diagnostic.IDE0060.severity = none # Remove unused parameter
217
- dotnet_diagnostic.IDE0080.severity = none # Remove unnecessary suppression operator
218
- dotnet_diagnostic.IDE0100.severity = none # Remove unnecessary equality operator
219
- dotnet_diagnostic.IDE0110.severity = none # Remove unnecessary discards
220
- dotnet_diagnostic.IDE0032.severity = none # Use auto property
221
- dotnet_diagnostic.IDE0160.severity = none # Use block-scoped namespace
222
- dotnet_diagnostic.VSTHRD111.severity = none # Use .ConfigureAwait(bool) is hidden by default, set to none to prevent IDE from changing on autosave
223
- dotnet_diagnostic.xUnit1004.severity = none # Test methods should not be skipped. Remove the Skip property to start running the test again.
224
-
225
- ###############################
226
- # Naming Conventions #
227
- ###############################
228
-
229
- # Styles
230
-
231
- dotnet_naming_style.pascal_case_style.capitalization = pascal_case
232
-
233
- dotnet_naming_style.camel_case_style.capitalization = camel_case
234
-
235
- dotnet_naming_style.static_underscored.capitalization = camel_case
236
- dotnet_naming_style.static_underscored.required_prefix = s_
237
-
238
- dotnet_naming_style.underscored.capitalization = camel_case
239
- dotnet_naming_style.underscored.required_prefix = _
240
-
241
- dotnet_naming_style.uppercase_with_underscore_separator.capitalization = all_upper
242
- dotnet_naming_style.uppercase_with_underscore_separator.word_separator = _
243
-
244
- dotnet_naming_style.end_in_async.required_prefix =
245
- dotnet_naming_style.end_in_async.required_suffix = Async
246
- dotnet_naming_style.end_in_async.capitalization = pascal_case
247
- dotnet_naming_style.end_in_async.word_separator =
248
-
249
- # Symbols
250
-
251
- dotnet_naming_symbols.constant_fields.applicable_kinds = field
252
- dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
253
- dotnet_naming_symbols.constant_fields.required_modifiers = const
254
-
255
- dotnet_naming_symbols.local_constant.applicable_kinds = local
256
- dotnet_naming_symbols.local_constant.applicable_accessibilities = *
257
- dotnet_naming_symbols.local_constant.required_modifiers = const
258
-
259
- dotnet_naming_symbols.private_static_fields.applicable_kinds = field
260
- dotnet_naming_symbols.private_static_fields.applicable_accessibilities = private
261
- dotnet_naming_symbols.private_static_fields.required_modifiers = static
262
-
263
- dotnet_naming_symbols.private_fields.applicable_kinds = field
264
- dotnet_naming_symbols.private_fields.applicable_accessibilities = private
265
-
266
- dotnet_naming_symbols.any_async_methods.applicable_kinds = method
267
- dotnet_naming_symbols.any_async_methods.applicable_accessibilities = *
268
- dotnet_naming_symbols.any_async_methods.required_modifiers = async
269
-
270
- # Rules
271
-
272
- dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
273
- dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
274
- dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = error
275
-
276
- dotnet_naming_rule.local_constant_should_be_pascal_case.symbols = local_constant
277
- dotnet_naming_rule.local_constant_should_be_pascal_case.style = pascal_case_style
278
- dotnet_naming_rule.local_constant_should_be_pascal_case.severity = error
279
-
280
- dotnet_naming_rule.private_static_fields_underscored.symbols = private_static_fields
281
- dotnet_naming_rule.private_static_fields_underscored.style = static_underscored
282
- dotnet_naming_rule.private_static_fields_underscored.severity = error
283
-
284
- dotnet_naming_rule.private_fields_underscored.symbols = private_fields
285
- dotnet_naming_rule.private_fields_underscored.style = underscored
286
- dotnet_naming_rule.private_fields_underscored.severity = error
287
-
288
- dotnet_naming_rule.async_methods_end_in_async.symbols = any_async_methods
289
- dotnet_naming_rule.async_methods_end_in_async.style = end_in_async
290
- dotnet_naming_rule.async_methods_end_in_async.severity = error
291
-
292
- ###############################
293
- # C# Coding Conventions #
294
- ###############################
295
-
296
- # var preferences
297
- csharp_style_var_for_built_in_types = false:none
298
- csharp_style_var_when_type_is_apparent = false:none
299
- csharp_style_var_elsewhere = false:none
300
- # Expression-bodied members
301
- csharp_style_expression_bodied_methods = false:silent
302
- csharp_style_expression_bodied_constructors = false:silent
303
- csharp_style_expression_bodied_operators = false:silent
304
- csharp_style_expression_bodied_properties = true:silent
305
- csharp_style_expression_bodied_indexers = true:silent
306
- csharp_style_expression_bodied_accessors = true:silent
307
- # Pattern matching preferences
308
- csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
309
- csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
310
- # Null-checking preferences
311
- csharp_style_throw_expression = true:suggestion
312
- csharp_style_conditional_delegate_call = true:suggestion
313
- # Modifier preferences
314
- csharp_preferred_modifier_order = public, private, protected, internal, static, extern, new, virtual, abstract, sealed, override, readonly, unsafe, volatile, async:suggestion
315
- # Expression-level preferences
316
- csharp_prefer_braces = true:error
317
- csharp_style_deconstructed_variable_declaration = true:suggestion
318
- csharp_prefer_simple_default_expression = true:suggestion
319
- csharp_style_prefer_local_over_anonymous_function = true:error
320
- csharp_style_inlined_variable_declaration = true:suggestion
321
-
322
- ###############################
323
- # C# Formatting Rules #
324
- ###############################
325
-
326
- # New line preferences
327
- csharp_new_line_before_open_brace = all
328
- csharp_new_line_before_else = true
329
- csharp_new_line_before_catch = true
330
- csharp_new_line_before_finally = true
331
- csharp_new_line_before_members_in_object_initializers = false # Does not work with resharper, forcing code to be on long lines instead of wrapping
332
- csharp_new_line_before_members_in_anonymous_types = true
333
- csharp_new_line_between_query_expression_clauses = true
334
- # Indentation preferences
335
- csharp_indent_braces = false
336
- csharp_indent_case_contents = true
337
- csharp_indent_case_contents_when_block = false
338
- csharp_indent_switch_labels = true
339
- csharp_indent_labels = flush_left
340
- # Space preferences
341
- csharp_space_after_cast = false
342
- csharp_space_after_keywords_in_control_flow_statements = true
343
- csharp_space_between_method_call_parameter_list_parentheses = false
344
- csharp_space_between_method_declaration_parameter_list_parentheses = false
345
- csharp_space_between_parentheses = false
346
- csharp_space_before_colon_in_inheritance_clause = true
347
- csharp_space_after_colon_in_inheritance_clause = true
348
- csharp_space_around_binary_operators = before_and_after
349
- csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
350
- csharp_space_between_method_call_name_and_opening_parenthesis = false
351
- csharp_space_between_method_call_empty_parameter_list_parentheses = false
352
- # Wrapping preferences
353
- csharp_preserve_single_line_statements = true
354
- csharp_preserve_single_line_blocks = true
355
- csharp_using_directive_placement = outside_namespace:warning
356
- csharp_prefer_simple_using_statement = true:suggestion
357
- csharp_style_namespace_declarations = file_scoped:warning
358
- csharp_style_prefer_method_group_conversion = true:silent
359
- csharp_style_prefer_top_level_statements = true:silent
360
- csharp_style_expression_bodied_lambdas = true:silent
361
- csharp_style_expression_bodied_local_functions = false:silent
@@ -1,34 +0,0 @@
1
- 
2
- Microsoft Visual Studio Solution File, Format Version 12.00
3
- # Visual Studio Version 17
4
- VisualStudioVersion = 17.0.31903.59
5
- MinimumVisualStudioVersion = 10.0.40219.1
6
- Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{3A93FBE3-99F5-4179-88AB-E8A887C4E85C}"
7
- EndProject
8
- Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cloud.Unum.USearch", "src\Cloud.Unum.USearch\Cloud.Unum.USearch.csproj", "{8828F7DE-3AB9-4CAE-BFFA-3EA9355BD976}"
9
- EndProject
10
- Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cloud.Unum.USearch.Tests", "src\Cloud.Unum.USearch.Tests\Cloud.Unum.USearch.Tests.csproj", "{F7F5E1D6-25DD-4FE8-ABE9-B05E7449B2A9}"
11
- EndProject
12
- Global
13
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
14
- Debug|Any CPU = Debug|Any CPU
15
- Release|Any CPU = Release|Any CPU
16
- EndGlobalSection
17
- GlobalSection(SolutionProperties) = preSolution
18
- HideSolutionNode = FALSE
19
- EndGlobalSection
20
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
21
- {8828F7DE-3AB9-4CAE-BFFA-3EA9355BD976}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
22
- {8828F7DE-3AB9-4CAE-BFFA-3EA9355BD976}.Debug|Any CPU.Build.0 = Debug|Any CPU
23
- {8828F7DE-3AB9-4CAE-BFFA-3EA9355BD976}.Release|Any CPU.ActiveCfg = Release|Any CPU
24
- {8828F7DE-3AB9-4CAE-BFFA-3EA9355BD976}.Release|Any CPU.Build.0 = Release|Any CPU
25
- {F7F5E1D6-25DD-4FE8-ABE9-B05E7449B2A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
26
- {F7F5E1D6-25DD-4FE8-ABE9-B05E7449B2A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
27
- {F7F5E1D6-25DD-4FE8-ABE9-B05E7449B2A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
28
- {F7F5E1D6-25DD-4FE8-ABE9-B05E7449B2A9}.Release|Any CPU.Build.0 = Release|Any CPU
29
- EndGlobalSection
30
- GlobalSection(NestedProjects) = preSolution
31
- {8828F7DE-3AB9-4CAE-BFFA-3EA9355BD976} = {3A93FBE3-99F5-4179-88AB-E8A887C4E85C}
32
- {F7F5E1D6-25DD-4FE8-ABE9-B05E7449B2A9} = {3A93FBE3-99F5-4179-88AB-E8A887C4E85C}
33
- EndGlobalSection
34
- EndGlobal
@@ -1,51 +0,0 @@
1
- This document outlines the steps to build, test, and publish a package to NuGet.
2
-
3
- # System setup
4
- To begin, install the .NET SDK: https://dotnet.microsoft.com/en-us/download
5
-
6
- # Compile USearch
7
-
8
- Collect the USearch libraries for all target runtimes: Linux, Windows, macOS. Place these libraries in the ./lib/runtimes/{RID}/native/ directory, where RID stands for Runtime Identifier. For more information on RIDs, visit [official documentation](https://learn.microsoft.com/en-us/dotnet/core/rid-catalog).
9
-
10
- To obtain all libraries, download the artifacts generated by the GitHub workflow and place them in the `lib` folder.
11
-
12
- To get a library for your current platform (Linux or Macos), execute: `./eng/build_lib.sh`.
13
-
14
- For more details, refer to the [compilation guide](https://github.com/unum-cloud/usearch/blob/main/CONTRIBUTING.md).
15
-
16
- # Build and Test
17
-
18
- ## Using dotnet CLI:
19
-
20
- dotnet build -c Release
21
- dotnet test -c Release --no-build
22
-
23
- ## Using script:
24
-
25
- For Linux/macOS, run: `./build_and_test.sh`
26
-
27
- For Windows, run: `build_and_test.cmd`
28
-
29
- # Push to NuGet
30
-
31
- ℹ️ **Note**
32
-
33
- For test, use the NuGet test server: https://apiint.nugettest.org/v3/index.json
34
-
35
- For release, use: https://api.nuget.org/v3/index.json
36
-
37
- ## Using dotnet CLI
38
-
39
- To pack specify `PACKAGE_VERSION` and run:
40
-
41
- dotnet pack -c Release -p:Version="${PACKAGE_VERSION}"
42
-
43
- To publish, set `PACKAGE_VERSION`, `NUGET_APIKEY`, and `NUGET_SERVER`, then run:
44
-
45
- dotnet nuget push "./packages/Cloud.Unum.USearch.${PACKAGE_VERSION}.nupkg" -k ${NUGET_APIKEY} -s ${NUGET_SERVER}
46
-
47
- ## Using script
48
-
49
- Run the script to clear `packages` folder of older artifacts, then builds and pushes project:
50
-
51
- PACKAGE_ID= PACKAGE_VERSION= NUGET_APIKEY= NUGET_SERVER= ./pack.sh
@@ -1,29 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Project>
3
-
4
- <PropertyGroup>
5
- <LangVersion>10</LangVersion>
6
- </PropertyGroup>
7
-
8
- <PropertyGroup>
9
- <Configuration Condition="'$(Configuration)'==''">Debug</Configuration>
10
- <Platform Condition="'$(Platform)'==''">AnyCPU</Platform>
11
-
12
- <TargetArchitecture Condition="'$(TargetArchitecture)' == ''">$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)</TargetArchitecture>
13
- <TargetArchitecture>$(TargetArchitecture.ToLower())</TargetArchitecture>
14
-
15
- <TargetOS Condition="$([MSBuild]::IsOSPlatform('Windows'))">win</TargetOS>
16
- <TargetOS Condition="$([MSBuild]::IsOSPlatform('Linux'))">linux</TargetOS>
17
- <TargetOS Condition="$([MSBuild]::IsOSPlatform('OSX'))">osx</TargetOS>
18
- </PropertyGroup>
19
-
20
- <PropertyGroup>
21
- <RepoRoot Condition="'$(RepoRoot)' == ''">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\'))</RepoRoot>
22
- <CSharpDir>$(RepoRoot)csharp\</CSharpDir>
23
- <NativeLibBuildScriptsDir>$(CSharpDir)eng\</NativeLibBuildScriptsDir>
24
- <NativeLibDir>$(CSharpDir)lib\</NativeLibDir>
25
- <PackageOutputPath>$(CSharpDir)packages</PackageOutputPath>
26
- </PropertyGroup>
27
-
28
-
29
- </Project>
package/csharp/README.md DELETED
@@ -1,74 +0,0 @@
1
- # USearch for C#
2
-
3
- ## Installation
4
-
5
- ```sh
6
- dotnet add package Cloud.Unum.USearch
7
- ```
8
-
9
- ## Quickstart
10
-
11
- ```csharp
12
- using System.Diagnostics;
13
- using Cloud.Unum.USearch;
14
-
15
- using var index = new USearchIndex(
16
- metricKind: MetricKind.Cos, // Choose cosine metric
17
- quantization: ScalarKind.Float32, // Only quantization to Float32, Float64 is currently supported
18
- dimensions: 3, // Define the number of dimensions in input vectors
19
- connectivity: 16, // How frequent should the connections in the graph be, optional
20
- expansionAdd: 128, // Control the recall of indexing, optional
21
- expansionSearch: 64 // Control the quality of search, optional
22
- );
23
-
24
- var vector = new float[] { 0.2f, 0.6f, 0.4f };
25
- index.Add(42, vector);
26
- int matches = index.Search(vector, 10, out ulong[] keys, out float[] distances);
27
-
28
- Trace.Assert(index.Size() == 1);
29
- Trace.Assert(matches == 1);
30
- Trace.Assert(keys[0] == 42);
31
- Trace.Assert(distances[0] <= 0.001f);
32
- ```
33
-
34
- ## Serialization
35
-
36
- ```csharp
37
- index.Save("index.usearch")
38
-
39
- // Copy the whole index into memory
40
- using var indexLoaded = new USearchIndex("index.usearch");
41
-
42
- // Or view from disk without loading in memory
43
- // using var indexLoaded = new USearchIndex("index.usearch", view: true);
44
-
45
- Trace.Assert(indexLoaded.Size() == 1);
46
- Trace.Assert(indexLoaded.Dimensions() == 3);
47
- Trace.Assert(indexLoaded.Connectivity() == 16);
48
- Trace.Assert(indexLoaded.Contains(42));
49
- ```
50
-
51
- ## Batch Operations
52
-
53
- Adding a batch of entries is identical to adding a single vector.
54
-
55
- ```csharp
56
- using var index = new USearchIndex(MetricKind.Cos, ScalarKind.Float32, dimensions: 3);
57
-
58
- // Generate keys and random vectors
59
- int n = 100;
60
- ulong[] keys = Enumerable.Range(0, n).Select(i => (ulong)i).ToArray();
61
- int dims = checked((int)index.Dimensions());
62
- float[][] vectors = Enumerable.Range(0, n)
63
- .Select(_ => Enumerable.Range(0, dims)
64
- .Select(__ => (float)new Random().NextDouble() * 0.3f)
65
- .ToArray())
66
- .ToArray();
67
-
68
- index.Add(keys, vectors);
69
- int matches = index.Search(vectors[0], 10, out ulong[] foundKeys, out float[] foundDistances);
70
-
71
- Trace.Assert(matches <= 10);
72
- Trace.Assert(foundKeys[0] == 0);
73
- Trace.Assert(foundDistances[0] <= 0.001f);
74
- ```
@@ -1,31 +0,0 @@
1
- @echo off
2
- setlocal EnableDelayedExpansion
3
-
4
- :: Get the absolute paths of the directory where the script is located and repo root
5
- set SCRIPT_DIR=%~dp0
6
- set REPO_ROOT=%SCRIPT_DIR%..\\
7
-
8
- :: Switch to the C# directory
9
- cd %REPO_ROOT%csharp\
10
-
11
- :: Clean and build the .NET project
12
- dotnet clean -c Release -p:RepoRoot="%REPO_ROOT%"
13
- dotnet build -c Release -p:RepoRoot="%REPO_ROOT%"
14
- if %ERRORLEVEL% neq 0 (
15
- echo Build failed!
16
- exit /b 1
17
- )
18
-
19
- :: Run the tests
20
- dotnet test -c Release -p:RepoRoot="%REPO_ROOT%" --no-build
21
- set EXIT_CODE=%ERRORLEVEL%
22
-
23
- if %EXIT_CODE% neq 0 (
24
- echo Tests failed!
25
- exit /b 1
26
- ) else (
27
- echo Tests passed successfully!
28
- exit /b 0
29
- )
30
-
31
- endlocal
@@ -1,30 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Get absolute path to the usearch dir
4
- # FIX: realpath is not available on OSX, so use pwd
5
- SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
6
- SCRIPT_DIR="${SCRIPT_DIR}/"
7
-
8
- # Define project paths
9
- REPO_ROOT=`cd -P "$SCRIPT_DIR../" && pwd`
10
- REPO_ROOT="${REPO_ROOT}/"
11
-
12
- # Clean and build the .NET project with RepoRoot property
13
- dotnet clean -c Release -p:RepoRoot="$REPO_ROOT"
14
- dotnet build -c Release -p:RepoRoot="$REPO_ROOT"
15
- if [ $? -ne 0 ]; then
16
- echo "Build failed!"
17
- exit 1
18
- fi
19
-
20
- # Run the tests
21
- dotnet test -c Release -p:RepoRoot="$REPO_ROOT" --no-build
22
- EXIT_CODE=$?
23
-
24
- if [ $EXIT_CODE -ne 0 ]; then
25
- echo "Tests failed!"
26
- exit 1
27
- else
28
- echo "Tests passed successfully!"
29
- exit 0
30
- fi
@@ -1,33 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Project>
3
- <PropertyGroup>
4
- <Version Condition="'$(Version)' == ''">2.8.7</Version>
5
-
6
- <Authors>Unum</Authors>
7
- <Company>Unum</Company>
8
- <PackageTags>USearch Vector Search Disk-based Multi-Modal Semantic-Search Molecular-Search</PackageTags>
9
- <PackageId>Cloud.Unum.USearch</PackageId>
10
-
11
- <PackageLicenseFile>LICENSE</PackageLicenseFile>
12
- <PackageProjectUrl>https://github.com/unum-cloud/usearch</PackageProjectUrl>
13
- <RepositoryUrl>https://github.com/unum-cloud/usearch</RepositoryUrl>
14
- <PublishRepositoryUrl>true</PublishRepositoryUrl>
15
-
16
- <PackageIcon>unum.png</PackageIcon>
17
- <PackageIconUrl>unum.png</PackageIconUrl>
18
- <PackageReadmeFile>README.md</PackageReadmeFile>
19
- </PropertyGroup>
20
-
21
- <ItemGroup>
22
- <None Include="$(NativeLibDir)runtimes\**\*.*" Pack="true" PackagePath="runtimes" />
23
- <None Include="$(RepoRoot)LICENSE" Pack="true" PackagePath=""/>
24
- <None Include="$(RepoRoot)assets\unum.png" Pack="true" PackagePath=""/>
25
- <None Include="$(RepoRoot)README.md" Pack="true" PackagePath=""/>
26
- </ItemGroup>
27
-
28
- <!-- Package validation https://learn.microsoft.com/en-us/dotnet/fundamentals/package-validation/overview?WT.mc_id=DT-MVP-5003978 -->
29
- <PropertyGroup Condition="'$(IsPackable)' == 'true'">
30
- <EnablePackageValidation Condition="'$(EnablePackageValidation)' == ''">true</EnablePackageValidation>
31
- </PropertyGroup>
32
-
33
- </Project>