Nomad changes
All checks were successful
Deploy fil (kreuzberg) / deploy (push) Successful in 49s

This commit is contained in:
Henrik Jess Nielsen
2026-06-01 23:40:55 +02:00
parent 72b1a0a6ed
commit b4c07d3693
5723 changed files with 1130655 additions and 0 deletions

28
crates/config.m4 Normal file
View File

@@ -0,0 +1,28 @@
dnl Configuration for Rust-based PHP extension via ext-php-rs.
dnl This file enables phpize to compile the extension using cargo instead of make.
PHP_ARG_ENABLE([kreuzberg],
[whether to enable the kreuzberg extension],
[AS_HELP_STRING([--enable-kreuzberg],
[Enable kreuzberg extension support])],
[yes])
if test "$PHP_KREUZBERG_ENABLED" = "yes"; then
dnl Check that cargo is available
AC_PATH_PROG([CARGO], [cargo], [no])
if test "x$CARGO" = "xno"; then
AC_MSG_ERROR([cargo is required to build this extension])
fi
dnl Build the Rust extension using cargo
AC_MSG_NOTICE([Building Rust extension kreuzberg])
dnl Set up the extension module
PHP_NEW_EXTENSION(kreuzberg, [], $ext_shared)
dnl Custom build: invoke cargo instead of make
PHP_ADD_BUILD_DIR($ext_builddir)
dnl The actual build is handled by the build.rs script;
dnl cargo outputs the .so/.dylib/.dll which phpize will place in extension_dir.
fi