<feed xmlns='http://www.w3.org/2005/Atom'>
<title>unit-wasm.git/examples/rust/Makefile, branch v0.4.0</title>
<subtitle>Development libraries (C &amp; Rust) for writing WebAssembly modules for NGINX Unit</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit-wasm.git/'/>
<entry>
<title>rust: Fix building of unit-wasm and rust examples</title>
<updated>2025-05-14T17:09:44+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2025-05-14T16:00:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit-wasm.git/commit/?id=12763f6351d0c25b6f90dd7adbe0da3896d8e9c9'/>
<id>12763f6351d0c25b6f90dd7adbe0da3896d8e9c9</id>
<content type='text'>
When building the rust stuff we were getting the following compiler
error

  error: failed to run `rustc` to learn about target-specific information

  ...

    --- stderr
    error: Error loading target specification: Could not find specification for target "wasm32-wasi". Run `rustc --print target-list` for a list of built-in targets

This is due to wasm32-wasi being renamed to wasm32-wasip1, with
wasm32-wasi being kept clear for an eventual WASI 1.0 release.

Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When building the rust stuff we were getting the following compiler
error

  error: failed to run `rustc` to learn about target-specific information

  ...

    --- stderr
    error: Error loading target specification: Could not find specification for target "wasm32-wasi". Run `rustc --print target-list` for a list of built-in targets

This is due to wasm32-wasi being renamed to wasm32-wasip1, with
wasm32-wasi being kept clear for an eventual WASI 1.0 release.

Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>examples: Add C and Rust examples of handling large uploads</title>
<updated>2023-09-25T16:39:51+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2023-09-25T12:19:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit-wasm.git/commit/?id=e4a868078ab43772e36cd8ffc59fd995353fb402'/>
<id>e4a868078ab43772e36cd8ffc59fd995353fb402</id>
<content type='text'>
The programs demonstrate handling requests with payloads larger than
4GiB which means they need to be written out to disk and so also
demonstrates the use of the file-system access mechanism.

Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The programs demonstrate handling requests with payloads larger than
4GiB which means they need to be written out to disk and so also
demonstrates the use of the file-system access mechanism.

Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>examples/rust: Fix building of the hello world demo</title>
<updated>2023-08-29T22:08:27+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2023-08-29T22:05:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit-wasm.git/commit/?id=5ab50752824ca605cb9a03da9807d70f588d9a6b'/>
<id>5ab50752824ca605cb9a03da9807d70f588d9a6b</id>
<content type='text'>
When I renamed it from minimal to hello-world, it stopped being built
due to the make target name being the same as the directory name
(hello-world).

Rename the make target to rust-hello-world which also matches the naming
of the rest of the targets.

Fixes: 656c036 ("examples/rust: Add a minimal hello world rust example")
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When I renamed it from minimal to hello-world, it stopped being built
due to the make target name being the same as the directory name
(hello-world).

Rename the make target to rust-hello-world which also matches the naming
of the rest of the targets.

Fixes: 656c036 ("examples/rust: Add a minimal hello world rust example")
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>examples/rust: Add a minimal hello world rust example</title>
<updated>2023-08-29T19:42:23+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2023-08-29T16:01:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit-wasm.git/commit/?id=656c03609a2ba480dc88b28ade288b33a4b3a26b'/>
<id>656c03609a2ba480dc88b28ade288b33a4b3a26b</id>
<content type='text'>
This is about the smallest it can be.

Its Unit application config would look like

    "applications": {
        "rust-hello-world": {
            "type": "wasm",
            "module": "/path/to/unit-wasm/examples/rust/hello-world/target/wasm32-wasi/debug/rust_hello_world.wasm",
            "request_handler": "uwr_request_handler",
            "malloc_handler": "luw_malloc_handler",
            "free_handler": "luw_free_handler"
        }
    }

Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is about the smallest it can be.

Its Unit application config would look like

    "applications": {
        "rust-hello-world": {
            "type": "wasm",
            "module": "/path/to/unit-wasm/examples/rust/hello-world/target/wasm32-wasi/debug/rust_hello_world.wasm",
            "request_handler": "uwr_request_handler",
            "malloc_handler": "luw_malloc_handler",
            "free_handler": "luw_free_handler"
        }
    }

Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Initial commit</title>
<updated>2023-08-21T22:24:12+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2023-08-02T16:03:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit-wasm.git/commit/?id=d6ed6a219b31a58526721f96195c80061d41ce54'/>
<id>d6ed6a219b31a58526721f96195c80061d41ce54</id>
<content type='text'>
libunit-wasm and example C and Rust WebAssembly modules for NGINX Unit.

Co-developed-by: Timo Stark &lt;t.stark@nginx.com&gt;
Co-developed-by: Liam Crilly &lt;liam@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>
libunit-wasm and example C and Rust WebAssembly modules for NGINX Unit.

Co-developed-by: Timo Stark &lt;t.stark@nginx.com&gt;
Co-developed-by: Liam Crilly &lt;liam@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
