Open VincentRPS opened 1 month ago
Add a way to flag the compiler not to compile a specific piece of code on some systems. This could either be implemented in the stdlib as a macro, or some other way in the compiler itself.
@cfg(system = "windows") const Window = Window::from_windows(winapi::Something()); @cfg(system = "linux") const Window = Window::from_linux(syslinux::Something()); @cfg(system = "macos") const Window = Window::from_macos(sysmacos::Something());
maybe @cfg instead? that'd be more versatile and convey the meaning better
Add a way to flag the compiler not to compile a specific piece of code on some systems. This could either be implemented in the stdlib as a macro, or some other way in the compiler itself.