Stream: wasi

Topic: char8


view this post on Zulip Pat Hickey (Feb 08 2020 at 20:16):

not sure what the right way to deal with char8 in the rust language bindings is, mostly because i dont think i fully understand unicode https://github.com/bytecodealliance/wasi/pull/42/files/e320bcd26876cd7e747b7e170c8b6fbd91c84d0c#diff-fdd8e616291f43e093a53818d402ebf2

This commit fast-forwards the WASI submodule and updates the relevant the machinery. It also updates generate_raw::generate fn to accept a slice in preparation for multi-module wasi_ephemeral. Chan...

view this post on Zulip Pat Hickey (Feb 08 2020 at 20:18):

it seems like we can't make a guarantee that passing a single char8 by value represents a single unicode point

view this post on Zulip Pat Hickey (Feb 08 2020 at 20:18):

but, in practice, we only ever use char8 in ephemeral as the target of a pointer

view this post on Zulip Pat Hickey (Feb 08 2020 at 20:19):

its passed as a parameter, along with a length, meaning "put a valid utf-8 string at this location"

view this post on Zulip Pat Hickey (Feb 08 2020 at 20:19):

anyhow, @Dan Gohman and maybe others can chime in on the thread :)

view this post on Zulip Dan Gohman (Feb 09 2020 at 00:07):

chimed in; TLDR: treating char8 like u8 is correct


Last updated: Nov 22 2024 at 16:03 UTC