Skip to content
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

Use an Arch enum and feature flags instead of cfg(target_arch) #102

Open
nbaksalyar opened this issue Sep 3, 2020 · 0 comments
Open

Use an Arch enum and feature flags instead of cfg(target_arch) #102

nbaksalyar opened this issue Sep 3, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@nbaksalyar
Copy link
Member

Instead of using #[cfg(target_arch = "x86_64")] for architecture-specific implementations, introduce corresponding feature flags - e.g.: #[cfg(feature = "x86_64")].

In addition to that, introduce an enum to be used for type arguments:

enum Arch { x86_64 }

This is required for the possibility of future multi-arch builds of Headcrab - for example, in case if we'd want to work with a core dump generated on an ARM-based machine (or connect to that machine remotely using the gdb-serial target).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant