You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be splendid if capstone exposed Cargo features such that you could only compile support in for specific architecture(s)--usually one, but maybe multiple architectures depending on circumstances. I realize this would probably complicate a few things (e.g. using pregenerated bindings could only be done under certain circumstances), but it'd be nice for building things that are guaranteed to only target architecture X and you don't care about disassembling things for not-X.
How complicated do you think this would be to add?
I've considered adding this feature, but, depending on the implementation, it's a lot of work. We could have a feature support_all_archs that depends on each arch's feature. By default, the support_all_archs could be enabled.
From there, there are two approaches
Compile Capstone with only the archs specified.
Could use the pre-generated bindings.
We would have unused Rust code, but at least the Capstone C library would be much smaller, which would cut down on the final binary size.
Same as 1, but also add #[cfg(...)] attributes capstone-rs to conditionally compile Rust code for each architecture.
This would additionally reduce Rust compile times
This is a lot more work, especially with macros that generate a lot of the architecture-specific code
It would be splendid if
capstone
exposed Cargo features such that you could only compile support in for specific architecture(s)--usually one, but maybe multiple architectures depending on circumstances. I realize this would probably complicate a few things (e.g. using pregenerated bindings could only be done under certain circumstances), but it'd be nice for building things that are guaranteed to only target architecture X and you don't care about disassembling things for not-X.How complicated do you think this would be to add?
/cc @lars-t-hansen
The text was updated successfully, but these errors were encountered: