diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a53fab07bb8..3430b92fb83 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -69,6 +69,18 @@ In various packages we use `CPP` pragmas to compile different code depending on the target architecture. Using `haskell.nix` cross compilation pipeline is very helpful to diagnose build time compiler errors. +#### Cross Compilation + +Nix allows to build Windows native executables on Linux, e.g. to build +`network-mux:lib:network-mux` component one can run this command: + +```bash +nix build .\#hydraJobs.x86_64-linux.ghc810-x86_64-w64-mingw32.packages.network-mux:lib:network-mux +``` + +Not all components are available in cross compilation right now. All the +test components are disabled in `./scripts/ci/cabal.project.local.Windows.CrossCompile`. + ### Running tests with cabal To run all tests from a particular component use the following command, in this