Code Monkey home page Code Monkey logo

Comments (6)

ffulin avatar ffulin commented on September 27, 2024

Hello

There are no specific plans to support modules at this time, though I'd certainly be interested to see how this space plays out and what potential impacts it might have on build performance.

Looking at the link you sent, it seems that it might be possible to use right now without any changes to FASTBuild, simply by specifying the correct command line options. Depending on how cumbersome that ends up being, in the future, it might be beneficial to have some of the work done automatically by FASTBuild. As the options appear somewhat experimental (and subject to change) it'd be worth waiting for that to stabilize before adding any dedicated functionality.

from fastbuild.

claimred avatar claimred commented on September 27, 2024

Looks like C++20 modules are here, shipped in VS2022.
https://devblogs.microsoft.com/cppblog/using-cpp-modules-in-msvc-from-the-command-line-part-1/

Wondering what could it mean for FASTBuild users. 🤔

from fastbuild.

kovarex avatar kovarex commented on September 27, 2024

I meanly wonder what it means when it comes to build times. Potentially, this should be a dealbreaker, making the compilation times way faster, but the current implementations are not done properly, as they can be even slower, or faster just in specific scenarios.
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1441r1.pdf

I wonder if they are approaching the order of magnitude compilation time speedup of modules we are expecting to have eventually.

from fastbuild.

claimred avatar claimred commented on September 27, 2024

Some discussion going on on C++ tooling study group mailing list about modules and build systems.

https://lists.isocpp.org/sg15/2022/03/1255.php

from fastbuild.

gab avatar gab commented on September 27, 2024

There's now a standard way of specifying source-level dependencies. From my limited understanding of modules the build system needs to do a pre-scan of every source file before the actual build, and this would be the output of that pre-scan: http://wg21.link/P1689
Apparently IDEs can take advantage of that file too, and MSVC already has support for it.
Relevant Reddit discussion: https://www.reddit.com/r/cpp/comments/s99ljm/comment/htmfyxo/?utm_source=share&utm_medium=web2x&context=3

One big expected benefit of modules besides performance is that it should remove the need to put templates in headers. The module you're referencing will just contain a serialized representation of the template that will be used to instantiate it for your specific type.
From a maintenance point of view, being able to transform a method into a templated method without having it forced up into a header sounds like a dream, and will likely make generic code much more palatable to use.

from fastbuild.

gab avatar gab commented on September 27, 2024

Update: Cmake shipped official modules support about 3 months ago, so it seems that the necessary support (especially dependency scanning) has shipped in all major compilers: https://gitlab.kitware.com/cmake/cmake/-/issues/18355

And this open-source release by Microsoft seems also quite relevant: https://devblogs.microsoft.com/cppblog/open-sourcing-ifc-sdk-for-cpp-modules/

from fastbuild.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.