<feed xmlns='http://www.w3.org/2005/Atom'>
<title>unit-wasm.git, branch v0.2.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>unit-wasm 0.2.0</title>
<updated>2023-08-30T13:56:03+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2023-08-30T13:56:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit-wasm.git/commit/?id=d81bc9290edc8d1eb59ced024499359ccd4da77a'/>
<id>d81bc9290edc8d1eb59ced024499359ccd4da77a</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>API-{C,Rust}.md: Note which version new functions were added</title>
<updated>2023-08-30T13:46:03+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2023-08-30T13:44:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit-wasm.git/commit/?id=dbd81dc934d0bfab56a99c01105ca2dd09b51644'/>
<id>dbd81dc934d0bfab56a99c01105ca2dd09b51644</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>README.md: Update for missing mention of rust-hello-world</title>
<updated>2023-08-30T13:12:38+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2023-08-30T13:12:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit-wasm.git/commit/?id=9f65baff8a0bd7bfe450278006318717c7e7cecd'/>
<id>9f65baff8a0bd7bfe450278006318717c7e7cecd</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>README.md: Add a link to API-Rust.md</title>
<updated>2023-08-30T12:58:12+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2023-08-30T10:32:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit-wasm.git/commit/?id=741a85ab66ec9c4438951bd1a0dc837ac4f30516'/>
<id>741a85ab66ec9c4438951bd1a0dc837ac4f30516</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>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>examples/rust: Reduce the scope of an unsafe block in echo-request</title>
<updated>2023-08-29T22:51:39+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2023-08-29T22:51:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit-wasm.git/commit/?id=71ba509e6d662e1e8e703a7e1e609e1b1f8eb929'/>
<id>71ba509e6d662e1e8e703a7e1e609e1b1f8eb929</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>Rust/rusty: Make use of uwr_get_http_total_content_sent()</title>
<updated>2023-08-29T22:41:11+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2023-08-29T22:31:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit-wasm.git/commit/?id=04197e036a01d3826e0529f1396924a868bb4dd2'/>
<id>04197e036a01d3826e0529f1396924a868bb4dd2</id>
<content type='text'>
When the uwr_get_http_content_str() function, which returns the request
body content as a string, was added it used uwr_get_http_content_len()
to determine the length of the returned string (the request body content
is not null-terminated).

This could potentially in some circumstances return too much data if the
request was split over multiple calls into the Wasm module and
uwr_get_http_content_str() was called before all the data had actually
been received.

Instead use the newly introduced uwr_get_http_total_content_sent()
function to determine the amount of data to return in the string as it
currently stands.

Fixes: bf968c9 ("Rust/rusty: Add uwr_get_http_content_str()")
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 the uwr_get_http_content_str() function, which returns the request
body content as a string, was added it used uwr_get_http_content_len()
to determine the length of the returned string (the request body content
is not null-terminated).

This could potentially in some circumstances return too much data if the
request was split over multiple calls into the Wasm module and
uwr_get_http_content_str() was called before all the data had actually
been received.

Instead use the newly introduced uwr_get_http_total_content_sent()
function to determine the amount of data to return in the string as it
currently stands.

Fixes: bf968c9 ("Rust/rusty: Add uwr_get_http_content_str()")
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Rust/rusty: Add a wrapper for luw_get_http_total_content_sent()</title>
<updated>2023-08-29T22:30:21+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2023-08-29T22:30:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit-wasm.git/commit/?id=5dc0cf051059ac83899b55f4a55df363faea4419'/>
<id>5dc0cf051059ac83899b55f4a55df363faea4419</id>
<content type='text'>
This returns the total amount of content that the Wasm module has
received so far.

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 returns the total amount of content that the Wasm module has
received so far.

Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Rust/rusty: Re-order some functions more logically</title>
<updated>2023-08-29T22:23:05+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2023-08-29T22:23:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit-wasm.git/commit/?id=f748851daf87ce40cd2fed8c205afc4482c689a1'/>
<id>f748851daf87ce40cd2fed8c205afc4482c689a1</id>
<content type='text'>
This may not matter in rust (if you use a function before the compiler
has seen a definition for it), but anyway in preparation for adding a
uwr_get_http_total_content_sent() function, put the content length
related functions before the functions that return the content.

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 may not matter in rust (if you use a function before the compiler
has seen a definition for it), but anyway in preparation for adding a
uwr_get_http_total_content_sent() function, put the content length
related functions before the functions that return the content.

Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libunit-wasm: Add a luw_get_http_total_content_sent() function</title>
<updated>2023-08-29T22:12:56+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2023-08-29T21:22:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit-wasm.git/commit/?id=59cb1e8000e1b18e317cb1c19185eb3a1b5d4e9f'/>
<id>59cb1e8000e1b18e317cb1c19185eb3a1b5d4e9f</id>
<content type='text'>
This function returns the total amount of content that the Wasm module
has received so far.

This will be used in the rusty API's uwr_get_http_content_str() function
which returns the body content as a string. Due to the body content not
being null-terminated we need to know how much data to use for the
string, for which we are currently using uwr_get_http_content_len(),
which could in some cases return too much if a request is being split
over multiple calls the module.

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 function returns the total amount of content that the Wasm module
has received so far.

This will be used in the rusty API's uwr_get_http_content_str() function
which returns the body content as a string. Due to the body content not
being null-terminated we need to know how much data to use for the
string, for which we are currently using uwr_get_http_content_len(),
which could in some cases return too much if a request is being split
over multiple calls the module.

Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
