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

Allow the shortcut to accept and return values of arbitrary types #2

Open
Scripter17 opened this issue Nov 26, 2023 · 3 comments
Open

Comments

@Scripter17
Copy link

I'm building a URL cleaner that takes a string and returns a string. Unfortunately the shortcut this app provides only allows number arguments and return values

The built-in "Set Variable" action proves that actions can take and return arbitrary types, so in theory this should be possible

@kateinoigakukun
Copy link
Owner

Unfortunately, it's not a simple problem. Wasm core spec does not have ABI for string representation and how to manage its buffer memory space. I think supporting Component Model, which defines higher-level types ABI, in Wasmic would improve the situation, but there is no fixed plan yet.

@Scripter17
Copy link
Author

Scripter17 commented Dec 12, 2023

Now that I've had to endure updating my URL cleaner shortcut again, I'm putting a $100 USD bounty on just being able to return strings

Extra $20 if you can get HTTP to work without CORS being an issue but that's something I can work around

There's a separate ios app called Actions that I've also put a $100 bounty on WASM support on, and I want to clarify it's not a race. I will pay out both bounties if both you and Actions can return strings from WASM

@Scripter17
Copy link
Author

Assuming WASM has some concept of an STDOUT even without WASI, would it be possible to add a toggle to the action to switch between returning the return value and returning the STDOUT?

It doesn't fix the lack of string inputs but I can manage that

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

No branches or pull requests

2 participants