WebAssembly / WebAssembly/WASI
What is the ABI of the Result<> type?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.8k
- Forks
- 333
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 3
Description
snapshot_docs
uses Result<> type
For example,
args_sizes_get() -> Result<(size, size), errno>
This type does not seems to be a C type, but looks like a type in the Rust programming language.
I do not find ABI definition in BasicCABI, for type similar to Result<>
Does Result<> has the same layout as
#[repr(C)]
enum Result<T, E> {
Ok(T),
Err(E),
}
What the layout of the following Result<>?
args_get(argv: Pointer<Pointer<u8>>, argv_buf: Pointer<u8>) -> Result<(), errno>
args_sizes_get() -> Result<(size, size), errno>
fd_write(fd: fd, iovs: ciovec_array) -> Result<size, errno>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with snapshot_docs/docs.md and the BasicCABI.md reference named in the issue, then trace how WASI result types are specified and represented at the ABI boundary. A complete resolution would document whether Result<> has a defined layout and clarify the layouts of the listed function results, with examples that remove the current ambiguity.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, wasm
- Domain
- documentation, operating-systems
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100