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: Add Playground Demo #82

Merged
merged 5 commits into from
Mar 7, 2023
Merged

feat: Add Playground Demo #82

merged 5 commits into from
Mar 7, 2023

Conversation

jshlbrd
Copy link
Collaborator

@jshlbrd jshlbrd commented Mar 6, 2023

Description

  • Adds new applications for running Substation locally in a browser using WebAssembly
  • Adds WebAssembly build tags

Motivation and Context

WebAssembly is used by other projects (e.g., Jsonnet, GJSON) to demo functionality locally in the browser, this change brings the same concept to Substation. This has low impact on the core functionality of the project but makes it easier for non-users to demo the system.

WebAssembly doesn't support every feature of the project, so I've added build tags that separates production builds from WASM builds. This has the most impact in the process library where _wasm.go files were added -- these only exist to satisfy interfaces and ensure cross-compatibility with other operating systems. If a user calls one of these processors in the browser, then they get an ENOSYS error.

How Has This Been Tested?

It's running here: substation-play.pages.dev.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@jshlbrd jshlbrd marked this pull request as ready for review March 6, 2023 20:53
@jshlbrd jshlbrd requested a review from a team as a code owner March 6, 2023 20:53
Copy link
Contributor

@shellcromancer shellcromancer left a comment

Choose a reason for hiding this comment

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

Super cool! 🚀

@jshlbrd jshlbrd merged commit f519eaf into main Mar 7, 2023
@jshlbrd jshlbrd deleted the jshlbrd/playground branch March 7, 2023 17:26
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.

2 participants