<feed xmlns='http://www.w3.org/2005/Atom'>
<title>unit-wasm.git/examples/rust/upload-reflector/src, branch v0.3.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>examples/rust: Do some simplification around unsafe {} blocks</title>
<updated>2023-10-17T18:01:06+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2023-10-17T17:59:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit-wasm.git/commit/?id=9b17f64d301334b999a8138037d32ff72e951018'/>
<id>9b17f64d301334b999a8138037d32ff72e951018</id>
<content type='text'>
We can put the unsafe keyword as part of the function definition,
getting rid of the unsafe {} blocks in the functions themselves.

Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can put the unsafe keyword as part of the function definition,
getting rid of the unsafe {} blocks in the functions themselves.

Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>examples/rust: Amend upload-reflector for recent changes</title>
<updated>2023-09-25T16:36:23+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2023-09-19T22:46:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit-wasm.git/commit/?id=263541e24546ba0a75e26fef3c5442238d9fcac2'/>
<id>263541e24546ba0a75e26fef3c5442238d9fcac2</id>
<content type='text'>
The previous commit changed uwr_get_http_content_len() to return a u64
to allow for uploads larger than 4GiB, which now means this generates
compiler errors about type mismatches, expected usize got u64.

Cast the return value of uwr_get_http_content_len() to usize to match
that of TOTAL_RESPONSE_SENT.

(Making TOTAL_RESPONSE_SENT a u64 creates a larger trail of problems).

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 previous commit changed uwr_get_http_content_len() to return a u64
to allow for uploads larger than 4GiB, which now means this generates
compiler errors about type mismatches, expected usize got u64.

Cast the return value of uwr_get_http_content_len() to usize to match
that of TOTAL_RESPONSE_SENT.

(Making TOTAL_RESPONSE_SENT a u64 creates a larger trail of problems).

Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>examples/rust: Update for new API additions</title>
<updated>2023-08-30T00:55:26+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2023-08-30T00:55:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit-wasm.git/commit/?id=d62b8e93fdaf62a36c36437f987485f7be36e52f'/>
<id>d62b8e93fdaf62a36c36437f987485f7be36e52f</id>
<content type='text'>
Update the echo-request and upload-reflector examples for the new
uwr_http_add_header_content_type() and uwr_http_add_header_content_len()
functions.

Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update the echo-request and upload-reflector examples for the new
uwr_http_add_header_content_type() and uwr_http_add_header_content_len()
functions.

Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libunit-wasm: Remove the idx argument from luw_http_add_header()</title>
<updated>2023-08-28T15:20:26+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2023-08-28T15:11:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit-wasm.git/commit/?id=da5d9dc03b14b4d0f1ce0ce3ff093f387e148706'/>
<id>da5d9dc03b14b4d0f1ce0ce3ff093f387e148706</id>
<content type='text'>
This was used to specify the index of the response header being added,
starting at 0 and incrementing by one for each header.

Instead of having the programmer specify this, track it internally.

We add an extra check in luw_http_add_header() to make sure we aren't
trying to add more headers than we said with luw_http_init_headers(), if
we are, simply return.

This updates the API-C.md and the various examples and 'rusty' API
wrapper.

Suggested-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>
This was used to specify the index of the response header being added,
starting at 0 and incrementing by one for each header.

Instead of having the programmer specify this, track it internally.

We add an extra check in luw_http_add_header() to make sure we aren't
trying to add more headers than we said with luw_http_init_headers(), if
we are, simply return.

This updates the API-C.md and the various examples and 'rusty' API
wrapper.

Suggested-by: Liam Crilly &lt;liam@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Rust: Port the Rust Wasm demos to the new 'rusty' wrappers</title>
<updated>2023-08-25T20:13:49+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2023-08-24T19:43:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit-wasm.git/commit/?id=f9c01f4f721969c7dbe6152bbd38cc039acb27bf'/>
<id>f9c01f4f721969c7dbe6152bbd38cc039acb27bf</id>
<content type='text'>
rusty is a thin wrapper over the generated libunit-wasm bindings to
provide a more native rust like interface.

This gets rid of all the casting and ugly string handling. It massively
reduces the amount of unsafe {} blocks needed, though some still are...

All in all this provides a nice code cleanup.

Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
rusty is a thin wrapper over the generated libunit-wasm bindings to
provide a more native rust like interface.

This gets rid of all the casting and ugly string handling. It massively
reduces the amount of unsafe {} blocks needed, though some still are...

All in all this provides a nice code cleanup.

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>
