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

docs: wasm simulator playground #130

Open
HipsterBrown opened this issue Jun 17, 2023 · 2 comments
Open

docs: wasm simulator playground #130

HipsterBrown opened this issue Jun 17, 2023 · 2 comments
Labels
documentation Changes only affect the documentation enhancement New feature or request

Comments

@HipsterBrown
Copy link
Owner

It is possible to target wasm as a platform for the build/run commands with xs-dev and open the simulator in a browser by serving the output via a static file server. With this in mind, could it be feasible to create an online "playground" (see TypeScript, Docker, Pebble), that provides example programs running in the hosted simulator?

As the capabilities of the wasm simulator are expanded to include sensor data from the browser, simulated files, etc, then there might be a path to compiling user input as a "mod" to run in the wasm host program. This could also lead to flashing these examples to a local device, as demonstrated by esptool-js.

@HipsterBrown HipsterBrown added documentation Changes only affect the documentation enhancement New feature or request labels Jun 17, 2023
@dashcraft
Copy link

I've been too busy to devote much time to think through the hot reloading architecture, but this reminds me of
https://wokwi.com/projects/322410731508073042

The esp32 in browser simulator we came across awhile back. They have a web component element kit, https://github.com/wokwi/wokwi-elements, that could probably be leveraged for open source stuff as well.

@HipsterBrown
Copy link
Owner Author

Oh that's a very cool project and very much what I'm imagining for this feature. They appear to have a rp2040 simulator as well https://github.com/wokwi/rp2040js

I have not tried extending the xs-sim functionality before but these could be very useful for the wasm target at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Changes only affect the documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants