Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

DirectXMath as a C++ module

Abierto
#349 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Activo
Stack tecnológico
cpp

Línea de trabajo

Start by reading DirectXMath.h and the proposed DirectXMath.ixx contents, then inspect DirectXPackedVector.h and the mentioned SHMath, Stereo3D, and XDSP components. Done means the module structure, standard-library imports, export granularity, and Windows SDK or cppwinrt integration questions are resolved and an agreed module design is documented.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

A few months ago, I designed the winrt module for C++/WinRT. C++/WinRT depends on DirectXMath, so I hope DirectXMath can also be modularized. This would help make the winrt module cleaner and compilation faster. Thanks to the high quality of DirectXMath, modularizing it is easy, but some decisions need to be discussed.

Overall, the following changes need to be made:

  1. Provide a macro to disable the inclusion of all standard library headers in DirectXMath.h (for example, XM_IMPL_MODULE).
  2. Create the following DirectXMath.ixx:
    module;
    #include "sal.h"
    #include <intrins.h>
    #include <cassert>
    export module DirectXMath;
    import std;
    #define XM_IMPL_MODULE
    export
    {
    extern "C++"
    {
    #include "DirectXMath.h"
    }
    }
    
    extern "C++" is used so that when the header file and the module are used at the same time, the same functions can be merged and ODR violations can be avoided.

Once the details are settled, I can implement it. Any questions are welcome.

My questions:

  1. I hope to avoid using C standard library headers, and instead use the suffixless headers of the C++ standard library, and complete the std:: qualification for these types. This is to avoid using the std.compact module.
  2. Are fine-grained exports needed?
  3. DirectXPackedVector.h is not in DirectXMath.h. Should it be part of DirectXMath.ixx or a separate module?
  4. How should SHMath, Stereo3D, and XDSP be handled?
  5. Can the Windows SDK package the DirectXMath module?
Lenguaje dominante
C++
Estrellas
1.8k
Forks
262
Merge medio
3 d 12 h
PR fusionados (30 d)
5

Preparar el entorno

Aún no hemos revisado los archivos de configuración de este proyecto. Empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/DirectXMath

Todos los issues de microsoft/DirectXMath

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.