zcash / zcash

Zcash - Internet Money
https://z.cash/
Other
4.94k stars 2.04k forks source link

ZCash build system improvements to leverage native tooling and other (native) assets where applicable #1993

Open veikkoeeva opened 7 years ago

veikkoeeva commented 7 years ago

Context

This proposal stems from a short discussion on ZCash chat (with @str4d, who asked to submit an issue for further consideration) and from the lack of native way to both develop and consume Windows binaries of ZCash (but see https://github.com/zcash/zcash/issues/1989). Having a native Windows build would make it easier to participate on ZCash development as a developer, downstream developer, end-user and in other roles.

While having Windows binaries is the most immediate goal, there other qualities that could perhaps be realized. This proposal considers using CMake and other related tooling to achieve these goals. To stage the context, some reasons for a build system quoted from CMake build system: Distribute your software easily [pdf] by Cédric Castagnède.

What problems do build system solve?

For a developer:

For a development team:

For a user:

Features of a build system

automatic dependency management of source code

software portability

adaptability according user environment

customize installation

launch tests

Goals

  1. To improve the current build system to leverage native Windows tooling. Currently Autotools requires Mingw and cross-compiling to create Windows binaries and even then it looks somewhat difficult. 1.1 Improve in general other aspects of cross-platform reach and development tooling (see for exampe cmake -E server improves Visual Studio and Qt Creator IDEs and Kitware Increases Android Support in CMake 3.7)
  2. Build and improve other aspects of the build system, as described in the Context section. It looks like there would be more cross-platform expertise and tooling available on CMake.
  3. To make it easier for downstream developers to reuse assets, distribute them via Conan and on Microsoft platforms via Vcpkg, see difference to Nuget and Conand) and possibly Nuget. <edit:
  4. Remove unneeded code. Is the Qt code needed?
  5. Define and/or document clear interfaces for external library integrations.

Concerns and known issues

Proposed steps

  1. Start with a Windows build since there is not one currently (but see but see https://github.com/zcash/zcash/issues/1989 as far as creating executable Windows binaries goes). A first pass implementation could be basic support using 64-bit Windows 10 using the latest C++ tool-chain leveraged by VS 2017, since these have native CMake support. There should not be problems to expand this to Windows 7 and older Microsoft provided tools later. 1.1 The first pass Windows implementation should also lay the groundwork for cross-platform builds.
  2. Add native Windows build to continuous integration. I don't know how ZCash does this currently, but Travis offers free CI system for open source projects (lacks Windows support currently), a similar services is Appveyor similarly offers free accounts for open source builds.
  3. Add support to either Mac OS or Linux in the desired order to manage risks and engineering efforts. Looking at other online projects, blogs and sources of information, this mightn't be a lot of effort.
  4. See and check other toolig used in other projects.

Further reading and resources

<edit: 2017-01-07.

radix42 commented 7 years ago

Is there an easy way to turn an issue into a ZIP, as that's what this feels like