Skip to content

feat: add simplicity wasm runner - #56

Merged
schoen merged 1 commit into
BlockstreamResearch:mainfrom
stringhandler:add-wasm2
Sep 17, 2026
Merged

schoen merged 1 commit into
BlockstreamResearch:mainfrom
stringhandler:add-wasm2

Conversation

@stringhandler

Copy link
Copy Markdown
Contributor

No description provided.

@imaginator

Copy link
Copy Markdown
Collaborator

@stringhandler I really like this in-page way of educating people.

@schoen

schoen commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

I'm not positive on where this functionality should live (but this repo is one real possibility). Totally agreed with @imaginator that this is a wonderful thing to have and we should use it more.

Current short-term plan is to use it for the "try it in your browser" on the reworked docs site. (I built that version using a clone of @stringhandler's original tree, not this version.) Other ideas:

(1) @stringhandler suggested a "SimplicityHL by example" book which would have various examples of language features and idioms for people to try in their browsers while they read.
(2) In language reference pages, we could add runnable examples of language syntax and features. For example, in a page like https://docs.simplicity-lang.org/simplicityhl-reference/match_expression/, we could actually make it so the reader could run the code examples.
(3) Others?

@schoen

schoen commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

The way we do it now on the live site is by building something with other tooling (that @stringhandler also made!) and then manually copying individual instances of a build interactive demo page into our tree to load via an <iframe>. This version seems a lot more convenient and a lot more practical. I'm going to try some tests on this one, probably tomorrow, and see how practically usable it is as a replacement for the existing tooling.

Comment thread mkdocs.yml
- tables:
- def_list:

hooks:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is a bug. There is already a hooks: section elsewhere in this file. The duplicate one gets ignored entirely; the plugin needs to be added to the existing section.

@schoen

schoen commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

After testing this, I'm convinced that this is the right approach and a huge benefit to the site. @stringhandler Could you fix that one thing about the mkdocs.yml with the duplicated config stanza?

schoen added a commit that referenced this pull request Sep 17, 2026
@schoen
schoen merged commit 9fc980b into BlockstreamResearch:main Sep 17, 2026
2 checks passed
@schoen

schoen commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

I did some additional work testing this and adding a feature with some AI assistance to cache transactions locally in the tree as files (so that we don't rely on live availability of Esplora and don't load it unnecessarily). However, this is still optional (it will still fall back to loading that data from the API if a given transaction is not cached). This PR worked well for me locally and I've just attempted a first live deploy using it; in a moment we can see how it goes.

@schoen

schoen commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

It works great! Thanks, @stringhandler.

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.

3 participants