You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Using an external library (in my case, librdkafka) #137
Hi
I've been trying to add librdkafka as an external library and use it inside my cpp code but when I try to compile it and generate the wasm file, I get this error:
I've searched about the error and according to this link, it seems that adding some link files to em++ options is not possible.
How can I do so? Is there a better way for reading a request and sending a Kafka message in envoy?
I've also attached the files that I made some changes to them here: sample.zip
You're trying to link together Proxy-Wasm plugin (built for wasm32 architecture) and system library (built for x86_64 architecture). This won't work, you need to build librdkafka++ from sources for wasm32 target as part of the plugin itself.
Activity
[-]Using external library (in my case, librdkafka)[/-][+]Using an external library (in my case, librdkafka)[/+]PiotrSikora commentedon Jul 11, 2022
You're trying to link together Proxy-Wasm plugin (built for wasm32 architecture) and system library (built for x86_64 architecture). This won't work, you need to build librdkafka++ from sources for wasm32 target as part of the plugin itself.
amirEBD commentedon Jul 12, 2022
I had the same issue with proxy-wasm as @MMahdiSetak mentioned, how can I get a wasm32 build for librdkafa++. @PiotrSikora
Thansk for any help :)
PiotrSikora commentedon Jul 12, 2022
You need to build it from sources as part of the plugin build process (assuming it even compiles to wasm32, since that's not guaranteed).