-
Notifications
You must be signed in to change notification settings - Fork 11
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
Implement BinaryenOptimiser module #61
Conversation
@axic need to fix CI's dependency issue. |
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.
Needs documentation in README.
use super::{ModuleError, ModulePreset, ModuleTranslator}; | ||
use parity_wasm::elements::*; | ||
|
||
// FIXME: change level names |
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.
Perhaps something renaming the enum itself would be clean enough. Something like BinaryenOptimizationLevel::O1
, etc. would be more clear, I think.
} | ||
|
||
fn translate(&self, module: &Module) -> Result<Module, ModuleError> { | ||
// FIXME: could just move this into `BinaryenOptimiser` |
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.
Agreed, would be much cleaner.
needs rebase. |
6e61ff3
to
fe2751d
Compare
@jakelang this is not final (tests aren't updated), but some things have changed, please have a look again |
c187717
to
c744590
Compare
@pepyakin any idea why CI would fail to build it? |
Oh looks like libclang isn't installed and binaryen-rs depends on bindgen (for now) which uses libclang. I think installing clang will solve the issue |
Ah right, that might be it, will try. Would be so much nicer cargo could scream when bindgen is missing a non-rust dependency :) |
51da914
to
bf1cd51
Compare
bc423b7
to
1ca7cfe
Compare
e376ab8
to
bc1ac21
Compare
1a88715
to
31d31b7
Compare
This works finally, including the CI. Crazy. |
Closes #60.