Skip to content

0.12.0

Compare
Choose a tag to compare
@nalgeon nalgeon released this 04 Jan 11:08
· 83 commits to main since this release

More in-browser playgrounds

Most playgrounds (like Go or PostgreSQL) run code on the Codapi server. But there are some playgrounds that work completely in the browser, no Codapi server required. There used to be two of them: JavaScript and Fetch.

Now there are five more:

These playgrounds are WASI based (WASI is an executable binary format for browsers based on WebAssembly). They require two additional scripts besides the usual snippet.js:

<script src="https://unpkg.com/@antonz/[email protected]/dist/runno.js"></script>
<script src="https://unpkg.com/@antonz/[email protected]/dist/engine/wasi.js"></script>
<script src="https://unpkg.com/@antonz/[email protected]/dist/snippet.js"></script>

JavaScript and Fetch playgrounds changes

⚠️ Old JavaScript and Fetch playgrounds now require the engine attribute:

<codapi-snippet engine="browser" sandbox="javascript" editor="basic">
</codapi-snippet>

<codapi-snippet engine="browser" sandbox="fetch" editor="basic">
</codapi-snippet>

This is a breaking change.