<feed xmlns='http://www.w3.org/2005/Atom'>
<title>unit.git/auto/modules/wasm-wasi-component, branch 1.34.1</title>
<subtitle>Universal Web Application Server</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/'/>
<entry>
<title>auto, wasm-wc: Copy the .so into build/lib/unit/modules/</title>
<updated>2024-07-08T14:43:17+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-07-02T16:02:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=b5fe3eaf1a0bcbc98d274902f5e38f2c2ad71dbc'/>
<id>b5fe3eaf1a0bcbc98d274902f5e38f2c2ad71dbc</id>
<content type='text'>
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 &lt;zelenkov@nginx.com&gt;
Fixes: 4e6d7e876 ("Wasm-wc: Wire it up to the build system")
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;zelenkov@nginx.com&gt;
Fixes: 4e6d7e876 ("Wasm-wc: Wire it up to the build system")
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>auto: Fix some indentation in auto/modules/wasm-wasi-component</title>
<updated>2024-07-08T14:43:17+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-07-02T16:01:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=0e6cc6dcfbd0c019bcd1b264252aeb88303b7362'/>
<id>0e6cc6dcfbd0c019bcd1b264252aeb88303b7362</id>
<content type='text'>
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Rebuild wasm-wasi-component when any of its dependencies change</title>
<updated>2024-03-14T16:09:31+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-03-07T16:14:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=a8cfea8b68b3734725faed366f9bea402596c20b'/>
<id>a8cfea8b68b3734725faed366f9bea402596c20b</id>
<content type='text'>
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 &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Wasm-wc: use more common uname switch to get operating system name</title>
<updated>2024-02-28T00:44:42+00:00</updated>
<author>
<name>Konstantin Pavlov</name>
<email>thresh@nginx.com</email>
</author>
<published>2024-02-27T22:42:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=23e807dea3a68ead712cb2eab54fba08e545872b'/>
<id>23e807dea3a68ead712cb2eab54fba08e545872b</id>
<content type='text'>
-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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
-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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Wasm-wc: Use the cargo build output as the make target dependency</title>
<updated>2024-02-22T03:17:08+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-02-22T02:24:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=d54af163c46bffd1bea0c2b544e412b5d628ec80'/>
<id>d54af163c46bffd1bea0c2b544e412b5d628ec80</id>
<content type='text'>
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 &lt;thresh@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;thresh@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Wasm-wc: Add nxt_unit.o as a dependency in the auto script</title>
<updated>2024-02-22T03:17:08+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-02-22T01:24:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=7b13c30604952059c337b8c6afa588fdb5b8895a'/>
<id>7b13c30604952059c337b8c6afa588fdb5b8895a</id>
<content type='text'>
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 &lt;thresh@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;thresh@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Wasm-wc: Wire it up to the build system</title>
<updated>2024-02-21T16:20:32+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-02-06T04:20:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=4e6d7e87685c30a62a654fc91e271d34dd642202'/>
<id>4e6d7e87685c30a62a654fc91e271d34dd642202</id>
<content type='text'>
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 &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
