WebAssembly / WebAssembly/wasi-libc

_initialize support

Open
#211 0 comments 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

Hi!

I have a use case when I need to periodically change WASI state (especially, envs) of already instantiated Wasm module. Seems that this _initialize could work for me. I'm not well familiar with new command and reactor model, but from Wasmtime this source code seems that it is impossible to simultaneously have _start and _initialize exports. So are there any options to reinitialize WASI state of a module without calling of _start (more precise, without subsequent _original_main)?

Thank you in advance.

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

Start with libc-bottom-half/crt/crt1-reactor.c and the referenced Wasmtime linker.rs section to understand how _start and _initialize are exposed. Determine whether WASI state can be reinitialized without invoking _start or _original_main; the issue does not identify a specific test or implementation location.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.