This devcontainer is configured to provide you a Zig toolset version 0.15.2 .
Tested against Cyber version "0.4-DEV build-415-bab51c11", this version info is displayed in the bottom of Cyber Playground webpage.
Note
Looks like the HTML code deployed on https://cyberscript.dev/play.html is not published in the Github repo.
So, the jsFetch() function does not exist anywhere in that Github repo.
But at the time of this writing, it just works in Cyber Playground, demonstrating the ability to make HTTP request from Cyber code
evaluated inside Cyber virtual machine which compiled to WASM.
At the meantime, use the following oversimplified instruction to make HTTP request from the Cyber WASM Playground (source code of some earlier version of it):
-
Navigate your browser to official Cyber playground: https://cyberscript.dev/play.html.
-
Switch to "JS Eval" tab.
-
Replace the code in editor on the left with following:
use web
var body = await web.eval("jsFetch('https://httpbin.org/anything')")
print body- Press the "Run" button next to editor and see the resulting output in the output area.
Created for (wannabe-awesome) list