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

feat request: func Wick Type like WIT type #465

Open
DougAnderson444 opened this issue Nov 5, 2023 · 1 comment
Open

feat request: func Wick Type like WIT type #465

DougAnderson444 opened this issue Nov 5, 2023 · 1 comment
Labels
enhancement New feature or request triage To be triaged

Comments

@DougAnderson444
Copy link
Contributor

feature request
The WIT model has func types, but it appears Wick IT does not?

For example, you can define a func that is the host's console_log to log output on the host from the WIT component.

Propose a solution
Add an importable host type called func (or if this is possible already, description/docs how to use it)

Describe alternatives you've considered
I'm new to Wick, so I don't see an alternative, but perhaps one exists?

Additional context
I'd like to be able to generate HTML from my Wick component, and then addEventListener using the browser's host function for this. I've done this with WIT and would like to try it with Wick.

@DougAnderson444 DougAnderson444 added enhancement New feature or request triage To be triaged labels Nov 5, 2023
@jsoverson
Copy link
Contributor

A wick component is essentially a collection of exported functions (with associated types). Wick's operations serve as functions the module exports. Wick components can import modules with a certain interface. It's up to the host to wire everything together. This happens in the CLI but is not yet implemented in the JS client.

For logging to the console though, you can build components for wasi and anything you print to stdout will go to the console

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage To be triaged
Projects
None yet
Development

No branches or pull requests

2 participants