Skip to content

Commit 3bd62f5

Browse files
committed
feat(examples): shared memory usage example
1 parent d0ff55e commit 3bd62f5

File tree

5 files changed

+586
-0
lines changed

5 files changed

+586
-0
lines changed

.github/workflows/nginx.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ env:
5252
load_module ${{ github.workspace }}/nginx/objs/ngx_http_async_module.so;
5353
load_module ${{ github.workspace }}/nginx/objs/ngx_http_awssigv4_module.so;
5454
load_module ${{ github.workspace }}/nginx/objs/ngx_http_curl_module.so;
55+
load_module ${{ github.workspace }}/nginx/objs/ngx_http_shared_dict_module.so;
5556
load_module ${{ github.workspace }}/nginx/objs/ngx_http_upstream_custom_module.so;
5657
5758
OPENSSL_VERSION: '3.0.16'

examples/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ name = "async"
5151
path = "async.rs"
5252
crate-type = ["cdylib"]
5353

54+
[[example]]
55+
name = "shared_dict"
56+
path = "shared_dict.rs"
57+
crate-type = ["cdylib"]
58+
5459
[features]
5560
default = ["export-modules", "ngx/vendored"]
5661
# Generate `ngx_modules` table with module exports

examples/config

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ if [ $HTTP = YES ]; then
3939
ngx_rust_module
4040
fi
4141

42+
if :; then
43+
ngx_module_name=ngx_http_shared_dict_module
44+
ngx_module_libs=
45+
ngx_rust_target_name=shared_dict
46+
47+
ngx_rust_module
48+
fi
49+
4250
if :; then
4351
ngx_module_name=ngx_http_upstream_custom_module
4452
ngx_module_libs=

0 commit comments

Comments
 (0)