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

wasm features .... #3

Open
gedw99 opened this issue Mar 10, 2025 · 1 comment
Open

wasm features .... #3

gedw99 opened this issue Mar 10, 2025 · 1 comment

Comments

@gedw99
Copy link
Collaborator

gedw99 commented Mar 10, 2025

Aim is to get the WASM aspects of https://github.com/sqldef/sqldef going...

Old one is here https://github.com/sqldef/sqldef.github.io/tree/master for reference.

Original discussion that set this all off is here: sqldef/sqldef#657 (reply in thread) for reference...

The system uses STDIO, so makes it easy to make the WASM aspects work well.

[OPTIONS] [FILENAME|current.sql] < desired.sql

Can do the WASM as a Web worker, with a Service worker then, pretty easily.


Latest go and tinygo for the new good stuff ...

go version go1.24.1 darwin/arm64

tinygo version 0.36.0 darwin/arm64 (using go version go1.24.1 and LLVM version 19.1.2)


nodes support as it has it now, so js devs can easily use this.


GUI rendering using HTML off the WASM Or using HTMX pattern. Can see whats best to the team wants.

With the WASM in the background of the browser, we can use HTMX patterns using SSE to feed the GUI from either the WASM or the server or both.


Interfacing with Server for "lookups" as you type perhaps. Is easy once you have the SSE push aspects, and also makes it real time collaborative, so many users can work at the same time as a bonus, and all see the same state, without ever having to refresh the browser / GUI.


sure there are things I missed as I am not familiar with the system yet.

other ideas ? @konsumer

@konsumer
Copy link
Collaborator

konsumer commented Mar 10, 2025

Can do the WASM as a Web worker, with a Service worker then, pretty easily

Stidio is not part of wasm, but it is part of WASI, so we might need more layers. I made a nice & simpler general WASI layer that works for all popular js runtimes easywasi. It can do files and other basic WASI stuff, including stdio. I think the CLI should mirror the current go & node-js CLIs, but I am hip to also adding stdio support.

The CLI can just be seperate from how the wasm works, too (like just give it a pointer/length for input/output strings) and then be wrapped in js.

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