summaryrefslogtreecommitdiffhomepage
path: root/auto/modules/wasm-wasi-component (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-07-08auto, wasm-wc: Copy the .so into build/lib/unit/modules/Andrew Clayton1-0/+2
Normally when the language modules are built, they are built directly into the build/lib/unit/modules/ directory. This then allows Unit to find them without being installed. This is useful for things like the pytests. This wasn't happening for the wasm-wasi-component language module. So we now copy it over and give it the right name as part of the make/build process. Reported-by: Andrei Zeliankou <zelenkov@nginx.com> Fixes: 4e6d7e876 ("Wasm-wc: Wire it up to the build system") Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-07-08auto: Fix some indentation in auto/modules/wasm-wasi-componentAndrew Clayton1-2/+2
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-03-14Rebuild wasm-wasi-component when any of its dependencies changeAndrew Clayton1-1/+8
Have cargo run if for example src/wasm-wasi-component/src/lib.rs is changed, or any of the other files that should perhaps trigger a rebuild. Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-02-27Wasm-wc: use more common uname switch to get operating system nameKonstantin Pavlov1-1/+1
-o is not available on macOS 12.7 at least, and it's what homebrew seems to support still. Also, the proposed switch seems to be used already in the codebase.
2024-02-22Wasm-wc: Use the cargo build output as the make target dependencyAndrew Clayton1-3/+5
cargo build creates the language module under src/wasm-wasi-component/target/release/libwasm_wasi_component.so and not build/lib/unit/modules/wasm_wasi_component.unit.so which is what we were using as a target dependency in the Makefile which doesn't exist so this resulted in the following $ make wasm-wasi-component-install cargo build --release --manifest-path src/wasm-wasi-component/Cargo.toml Finished release [optimized] target(s) in 0.17s install -d /opt/unit/modules install -p src/wasm-wasi-component/target/release/libwasm_wasi_component.so \ /opt/unit/modules/wasm_wasi_component.unit.so I.e it wanted to rebuild the module, after this patch we get the more correct $ make wasm-wasi-component-install install -d /opt/unit/modules install -p src/wasm-wasi-component/target/release/libwasm_wasi_component.so \ /opt/unit/modules/wasm_wasi_component.unit.so This is all a little ugly because we're fighting against cargo wanting to do its own thing and this wasm-wasi-component language module build process is likely going to get some re-working anyway, so this will do for now. Reported-by: Konstantin Pavlov <thresh@nginx.com> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-02-22Wasm-wc: Add nxt_unit.o as a dependency in the auto scriptAndrew Clayton1-2/+1
Rather than calling make itself to build nxt_unit.o make nxt_unit.o a dependency of the main module build target. Reported-by: Konstantin Pavlov <thresh@nginx.com> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-02-21Wasm-wc: Wire it up to the build systemAndrew Clayton1-0/+119
Et voila... $ ./configure wasm-wasi-component configuring wasm-wasi-component module Looking for rust compiler ... found. Looking for cargo ... found. + wasm-wasi-component module: wasm_wasi_component.unit.so $ make install test -d /opt/unit/sbin || install -d /opt/unit/sbin install -p build/sbin/unitd /opt/unit/sbin/ test -d /opt/unit/state || install -d /opt/unit/state test -d /opt/unit || install -d /opt/unit test -d /opt/unit || install -d /opt/unit test -d /opt/unit/share/man/man8 || install -d /opt/unit/sh man/man8 install -p -m644 build/share/man/man8/unitd.8 /opt/unit/share/ma n8/ make build/src/nxt_unit.o make[1]: Entering directory '/home/andrew/src/unit' make[1]: 'build/src/nxt_unit.o' is up to date. make[1]: Leaving directory '/home/andrew/src/unit' cargo build --release --manifest-path src/wasm-wasi-component/Cargo.toml Finished release [optimized] target(s) in 0.55s install -d /opt/unit/modules install -p src/wasm-wasi-component/target/release/libwasm_wasi_component.so \ /opt/unit/modules/wasm_wasi_component.unit.so Signed-off-by: Andrew Clayton <a.clayton@nginx.com>