AlexAltea / capstone.js

Capstone disassembler framework for JavaScript
https://alexaltea.github.io/capstone.js/
BSD 3-Clause "New" or "Revised" License
172 stars 28 forks source link

CAPSTONE_DIET #6

Open copy opened 7 years ago

copy commented 7 years ago

Capstone has a diet compile time flag, described here: http://www.capstone-engine.org/diet.html

This reduces the library size. It would be quite useful to provide builds with this flag, considering that capstone-x86.min.js is 2MB, which is prohibitively large for some JavaScript projects.

AlexAltea commented 7 years ago

My main concern is that the build matrix will get insanely large with too many builds to choose from, and not obvious for developers which one to pick (diet mode sacrifices information that is useful for some). Plus, it's just a 40% reduction. If 2 MB is too large, chances are 1.2 MB will be too large as well.

Providing precompiled builds was meant for popular combinations (e.g. single arch, multi arch) while more complex combinations (e.g. using CAPSTONE_DIET) can be built by passing the appropriate flags to build.py.

That said, if more people think diet-mode precompiled builds is absolutely necessary I will add that. (To "agree" with this proposal: upvote the comment above or subscribe to the issue)