summaryrefslogtreecommitdiff
path: root/src/simd/simdutf_c.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/simd/simdutf_c.cpp')
-rw-r--r--src/simd/simdutf_c.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/simd/simdutf_c.cpp b/src/simd/simdutf_c.cpp
new file mode 100644
index 000000000..4ba76b258
--- /dev/null
+++ b/src/simd/simdutf_c.cpp
@@ -0,0 +1,11 @@
+#include "simdutf.cpp"
+
+// This is just the C API we need from Zig. This is manually maintained
+// because the surface area is so small.
+extern "C" {
+
+size_t simdutf_convert_utf8_to_utf32(const char *src, size_t len, char32_t *dst) {
+ return simdutf::convert_utf8_to_utf32(src, len, dst);
+}
+
+}