WebAssembly / WebAssembly/wasi-libc

General Comments

Open
#175 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1k
Forks
251
Avg merge
7h 15m
Merged PRs (30d)
3

Description

Few comments I wanted to make in regard to a potential design:

  • Each syscall should ideally have its own entry point. Contrast this with one big syscall entry point where the host implementation must switch on a syscall number.
  • Relatedly, each syscall entry point should have a unique signature. For instance, emscripten currently passes a pointer to a struct that contains the arguments for each system call. This incurs overhead since the host implementation has to copy the arguments to its stack and also check if the user pointer overflow.
  • I think errno should live at a higher level. Syscalls simply return -errno to signal error. Non-negative return values flag success.
  • mmap() may require special consideration.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the proposed syscall design points in this issue, including per-syscall entry points, unique signatures, errno handling, and mmap(). Start by examining the current syscall implementation and its entry points in wasi-libc. Done means the project has an agreed design and an explicitly scoped implementation plan.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, wasm
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.