argotorg / argotorg/solc-js

"Browser Usage" in Readme probably wrong due to synchronous webassembly compilation

Open
#581 1 comment 0 reactions 0 assignees View on GitHub
bug :bug: documentation :book: medium effort medium impact must have eventually Needs Investigation
Dominant language
TypeScript
Stars
1.5k
Forks
349
Avg merge
8m
Merged PRs (30d)
1

Description

We specifically compile ``soljson.js`` with ``WASM_ASYNC_COMPILATION=0`` - there was a reason for this, but I don't remember right now.
However, I think at least chromium-based browsers won't allow synchronous compilation from the main thread. This effectively means that loading the compiler *has* to be done from web workers right now (at least if it's supposed to work in all browsers) and the "Browser Usage" section in ``README.md`` is outdated.

So we need to check if we can switch to asynchronous compilation in solidity, investigate if and what kind of problems synchronous compilation entails and adjust the section in the readme accordingly.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Browser Usage section in README.md and the soljson.js build setting WASM_ASYNC_COMPILATION=0. Check whether synchronous compilation works in Chromium-based browsers on the main thread and whether asynchronous compilation can be enabled; done means the supported loading approach is established and the README accurately reflects it.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, solidity, typescript, wasm
Domain
compilers, documentation, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.