Skip to content

Support c++ sdk #680

@Domi-Zhang

Description

@Domi-Zhang

The wasm go sdk has been deprecated, that repo owner recommends to using c++/rust sdk.
I have tested the example of c++ sdk repo, it's not work. The nginx has loaded my wasm plugin (log in error.log), but it not printed log message in functions, just like instances of my plugin has not be registered. The sdk provides an instance registration mechanism, but the strange thing is that after I commented out this line of code, the proxy behavior of nginx did not change at all, and neither did the error.log

example

registration mechanism

nginx.conf:

worker_processes auto;
error_log error.log info;

events {}

wasm {
        backtraces on;
        module request_recorder /home/zhangnf/workspace/codes/cpp/proxy-wasm-cpp-sdk/artifact/http_wasm_example.wasm;
}

http {
    server {
        listen 19052;

        location / {
            proxy_wasm request_recorder;
            proxy_pass http://bing.com;
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions