C cannot call a wap function back: no…

Open
#175 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
c, wasm
Domain
compilers

Research direction

Run test/wap/test_c.sh to reproduce the failing callback test, then read lib/callbacks.wap where c_callback_fired is defined and trace where the wap emitter binds library functions. The owner note points at host-port/wap-emitter rather than typing, so follow how callbacks are emitted when C calls back into wap. Done means the callback test and the qsort case no longer report that the module exports no c_callback_fired.

Written by the indexing model from the issue text.

Description

Original title: C cannot call a wap function back: the program exports no c_callback_fired

test/wap/test_c.sh 'a function that gives nothing is called back through c_callback' (branch valueless-argument c2fad32) fails: 'C called a function back, but the module calling C exports no c_callback_fired'. lib/callbacks.wap defines c_callback_fired, but it is likely never emitted, since library functions are bound only when typing reaches them. The qsort line meets it too, past its set_field_i64 red. Owner: host-port / wap-emitter (not typing). Reported by wap-binding.

Added by wap-binding with todo add.

Board card: https://github.com/users/pannous/projects/10?pane=issue&itemId=315562722

Dominant language
WebIDL
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from pannous/wap

All issues in pannous/wap

Similar issues

More Compilers issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.