Skip to content

Conversation

@mkannwischer
Copy link
Contributor

@mkannwischer mkannwischer commented Nov 1, 2025

@mkannwischer mkannwischer force-pushed the monobuild branch 9 times, most recently from ae02aad to 68fa08d Compare November 1, 2025 10:50
@mkannwischer mkannwischer marked this pull request as ready for review November 1, 2025 10:51
@mkannwischer mkannwischer requested a review from a team as a code owner November 1, 2025 10:51
@mkannwischer mkannwischer marked this pull request as draft November 1, 2025 10:52
@mkannwischer mkannwischer changed the title WIP: Add monolithic build Add monolithic build Nov 1, 2025
@mkannwischer mkannwischer marked this pull request as ready for review November 1, 2025 11:56
@mkannwischer mkannwischer force-pushed the monobuild branch 3 times, most recently from 0e16e2a to 66b31fb Compare November 1, 2025 12:42
@mkannwischer mkannwischer mentioned this pull request Nov 1, 2025
@mkannwischer mkannwischer changed the title Add monolithic build Autogenerate mldsa_native.c and add monobuild examples Nov 1, 2025
@mkannwischer mkannwischer force-pushed the monobuild branch 5 times, most recently from ddeaad3 to 1557cdb Compare November 3, 2025 11:26
Copy link
Contributor

@hanno-becker hanno-becker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make clean should clean all examples. Otherwise, LGTM

@mkannwischer
Copy link
Contributor Author

make clean should clean all examples. Otherwise, LGTM

Thanks, good catch - Fixed. I have also added

#define MLD_CONFIG_INTERNAL_API_QUALIFIER static

Thanks @willieyz for catching that I missed that.

It required a tiny change: 65897b1

@mkannwischer mkannwischer force-pushed the monobuild branch 3 times, most recently from 85a9bf2 to 3ad3089 Compare November 4, 2025 04:03
ML-DSA-44 and ML-DSA_86 only use mld_poly_uniform_gamma1_4x, while
ML-DSA-65 requires both mld_poly_uniform_gamma1_4x and
mld_poly_uniform_gamma1.
Hence, mld_poly_uniform_gamma1 should only be included in builds for
ML-DSA-65 to enable marking all internal functions as static in a
multi-level monobuild.

Signed-off-by: Matthias J. Kannwischer <[email protected]>
This commit ports the auto-generation script for mldsa_native.c from
mlkem-native. This file will be used in subsequent commits to demonstrate
a monolothic build.

Signed-off-by: Matthias J. Kannwischer <[email protected]>
This commit adds a new example to mldsa-native ported from mlkem-native.
It demonstrated how to build a single instance of mldsa-native in a single
compilation unit.

Signed-off-by: Matthias J. Kannwischer <[email protected]>
This ports the monolithic_build_multilevel from mlkem-native.
This examples demonstrated how to build multiple instances of mldsa-native in a
single compilation unit

Signed-off-by: Matthias J. Kannwischer <[email protected]>
Signed-off-by: Matthias J. Kannwischer <[email protected]>
Signed-off-by: Matthias J. Kannwischer <[email protected]>
The C90 tests were not functional before as make clean would not clean the
example code. The previous commit fixed that and revealed some C90
issues in the example code.
This commit fixes the C90 issues.

Signed-off-by: Matthias J. Kannwischer <[email protected]>
@mkannwischer mkannwischer merged commit 19d1e75 into main Nov 4, 2025
247 checks passed
@mkannwischer mkannwischer deleted the monobuild branch November 4, 2025 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add multi-level monobuild example autogen: Autogenerate SCU file for mldsa-native Add monobuild example

3 participants