Skip to content

Support returnable zeroperl command artifact#28

Open
sureshchouksey8 wants to merge 1 commit into
6over3:mainfrom
sureshchouksey8:codex/zeroperl-command-no-shutdown-clean
Open

Support returnable zeroperl command artifact#28
sureshchouksey8 wants to merge 1 commit into
6over3:mainfrom
sureshchouksey8:codex/zeroperl-command-no-shutdown-clean

Conversation

@sureshchouksey8

Copy link
Copy Markdown

This PR builds on the open direction in #24 by @mt211211 and keeps the host-callback / returnable-command approach intact. I am submitting it as a clean branch without workflow-file changes because my available GitHub token cannot push .github/workflows/* updates.

Targeted issue: #23, especially the latest tester report on #24: indirect call to null after the prior _start, unreachable executed, and asyncify-state fixes.

What changed:

  • adds a command-compatible zeroperl_command.wasm path with returnable _start
  • keeps the API/reactor artifact separate from the command artifact
  • avoids calling Perl global shutdown from the one-shot command wrapper, so browser/WASI shims do not immediately enter teardown/destructor paths after the script completes
  • includes the Node WASI command smoke test from the existing Make host callback import opt-in #24 direction
  • includes the supporting build fixes for zlib URL and ExifTool module discovery

Why:
The remaining trap appears after the command path is able to return. A plausible failure path is post-run global teardown in the browser/WASI shim rather than the script execution itself. For this command artifact, the Wasm instance is one-shot, so instance disposal can reclaim state instead of forcing Perl global teardown from _start.

Validation I could run here:

  • git diff --check
  • static assertion that stubs/zeroperl_main.c no longer references zeroperl_shutdown() and contains the one-shot command wrapper comment

Not run locally:

  • Docker/browser build. This machine does not have Docker, Podman, or Apple container available, so reporter validation is still needed.

Credit:
This is intentionally based on the implementation/debugging already done in #24 by @mt211211. The additional change I am adding is the command-wrapper teardown avoidance for the latest indirect call to null report.

@sureshchouksey8

Copy link
Copy Markdown
Author

/claim #23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant