Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(*) install ngx_wasm_rs along with nginx
There's a tricky thing going on. Since Wasmer itself is written in Rust and we build using a precompiled libwasmer.a generated with a different Rust version, if we link both libwasmer.a and libngx_wasm_rs.a, we get a link failure with some duplicated incompatible symbols [1][2]. For this reason, when we enable ngx_wasm_rs with Wasmer, we build it as a .so file rather than a statically-linked .a file. With this commit, we can install cdylibs under nginx's `--prefix` at `/lib` (e.g. `/usr/local/nginx/lib`, next to `/usr/local/nginx/sbin/nginx`) and ensure that the `nginx` binary can find it. See here for more info: [1] https://users.rust-lang.org/t/linking-more-than-one-rustc-compiled-static-libraries-in-a-c-project/89778/2 [2] #259 (comment)
- Loading branch information