Skip to content

fukaraadam-workspace/polkadot-js-quickjs

Repository files navigation

Polkadot.js wrapper for QuickJS engine

Warning: This is a work in progress.

Warning 2: WebSocket is needed in @polkadot/api, but QuickJS doesn't provide one. Either use custom QuickJS with websocket or provide a WebSocket object from entegration.

This is aimed to be wrapper for the @polkadot/api npm package, which allows you to use it in the QuickJS engine. Ultimately, this was planned to be used in Godot-JS

  • core-js package is used to polyfill the code (URL polyfill)
  • QuickJS throws TypeError: out-of-bound numeric index when trying to assign value to unavailable key of an object (e.g. Uint8Array). This is ignored on browsers and node, but not in QuickJS.
    • See ./src/problem.js for a simple example

How to use

As default, esbuild used to transpile and bundle code for its faster build, but webpack-babel can be used as well. Check package.json scripts for options.

  • Babel plugins used to transpile the code, which QuickJS can't understand (class-static-block)
  • Webpack used to bundle the code

About

Bundle polkadot.js for QuickJS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published