-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pack resolc.js and resolc.wasm into single file #173
base: main
Are you sure you want to change the base?
Conversation
This way of packing it works better in Firefox than the way we tried before? |
No is does not, I am doing still experiments Added lz4 compression, but there is still issue with compilation large contracts in firefox |
@@ -0,0 +1,118 @@ | |||
function uncompress(source, uncompressedSize) { | |||
/* | |||
Source https://github.com/ethereum/solidity/blob/develop/scripts/ci/mini-lz4.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xermicus This file is taken from Solidity. Is the licensing compliant for use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so as ethereum/solidity
appears to be GPL licensed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so I will rewrite this small part, and we will simply base it on the original mini-lz4. Does that work for you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, however I have a bunch of higher level questions related to this:
- Why is this needed?
- Why do they use a custom compression implementation (or is it also a custom algorithm)?
- Why not just use a library?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- It is used for resolc.wasm compression to limit its size
- it standard lz4 compression, but needs to be embedded it in the resolc.js to decompress wasm on the fly
- What do you mean? Do you want to embed npm lz4 package to resolc.js?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternative solution: #176
Pack resolc.js and resolc.wasm into single file
Format JS files
Fix issue with Module overwriting in preloaded js.