Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Describe legacy commands. #288

Merged
merged 1 commit into from
Mar 17, 2022
Merged

Conversation

sunfishcode
Copy link
Member

@sunfishcode sunfishcode commented Jun 11, 2020

The core idea of legacy commands is that all function exports are
command entrypoints, and they expect to be called on a fresh instance
which lives only for the direction of the call.

This is a generalization of the existing _start convention, which
already has the expectation of a fresh instance which lives only for
the direction of the call, and is one of the pieces need to enable
user-defined command entrypoints which don't take string arguments and
don't return an i32 status code.

To show how this works in practice, the following patches implement
this new behavior in wasm-ld and wasi-libc:

Base automatically changed from master to main January 19, 2021 23:08
The core idea of new-style commands is that all function exports are
command entrypoints, and they expect to be called on a fresh instance
which lives only for the direction of the call.

This is a generalization of the existing `_start` convention, which
already has the expectation of a fresh instance  which lives only for
the direction of the call, and is one of the pieces need to enable
user-defined command entrypoints which don't take string arguments and
don't return an i32 status code.

To show how this works in practice, the following patches implement
this new behavior in wasm-ld and wasi-libc:
 - https://reviews.llvm.org/D81689
 - WebAssembly/wasi-libc#203
@sunfishcode
Copy link
Member Author

This adds documentation for what is now the legacy application API. This documents behavior already implemented in clang and wasi-sdk, so my inclination is to merge it to document the current code. Any objections?

Copy link
Member

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, but the PR title and description don't seem to describe this change.. unless I'm missing something.

@sunfishcode sunfishcode changed the title Describe new-style commands. Describe legacy commands. Mar 17, 2022
@sunfishcode
Copy link
Member Author

Title and description updated. It was "new-style" at the time it was being developed, but now it's being subsumed by the component model.

@sunfishcode sunfishcode merged commit 59cbe14 into WebAssembly:main Mar 17, 2022
@sunfishcode sunfishcode deleted the default-export branch March 17, 2022 17:49
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.

3 participants