From 63fbee6694a37a64b544ee40207e2910551c8230 Mon Sep 17 00:00:00 2001 From: Edward Langley Date: Sat, 15 Nov 2025 14:26:39 -0800 Subject: [PATCH] Fix ngx 0.5.0 API compatibility - Update HttpModule trait implementation to match ngx 0.5.0 API - Implement HttpModuleLocationConf as separate unsafe trait - Fix configuration access using Module::location_conf() - Replace ngx_null_command macro with explicit null command - Update imports to use correct constant names - Suppress C FFI naming convention warnings --- .cursorrules | 1 + .envrc | 4 +- .idea/workspace.xml | 116 ++++++ Cargo.lock | 844 +++----------------------------------------- Cargo.toml | 2 +- conf/howto.conf | 2 +- runit | 2 +- src/lib.rs | 71 ++-- 8 files changed, 208 insertions(+), 834 deletions(-) create mode 100644 .cursorrules create mode 100644 .idea/workspace.xml diff --git a/.cursorrules b/.cursorrules new file mode 100644 index 0000000..4c3e237 --- /dev/null +++ b/.cursorrules @@ -0,0 +1 @@ +- Always use `direnv exec "$PWD"` when invoking cargo and other tools that need access to the nix/direnv environment diff --git a/.envrc b/.envrc index b310385..ab2a9ab 100644 --- a/.envrc +++ b/.envrc @@ -1,5 +1,7 @@ use flake unset TMPDIR -export NGINX_SOURCE_DIR=$PWD/ngx_src/nginx-1.28.0 +export NGINX_SOURCE_DIR=$PWD/ngx_src/nginx-1.28.0/ +export NGINX_BUILD_DIR=$PWD/ngx_src/nginx-1.28.0/objs/ export ZLIB_VERSION=1.3.1 +export NGX_VERSION=1.28.0 export CFLAGS='-Wno-unterminated-string-initialization' diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..a5134b9 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + { + "associatedIndex": 4 +} + + + + + + + + + + + + + + + + + + + + + + + 1763241867264 + + + + + + + +