Skip to content

Conversation

willieyz
Copy link
Contributor

@willieyz willieyz commented Aug 14, 2025

  • Resolves Add no-stdlib build for mlkem-native #963
  • This PR add an example demonstrating how to build mlkem-native without the standard library (-nostdlib)
    • Create an example folder named multilevel_build_no_stdlib
    • Add the example_no_stdlib_config.h reference from test/custom_stdlib_config.h,
      this config file provide custom implementations for mlk_memcpy and mlk_memset
    • Add the -nostdlib cflag during generating objects file.
    • Integrate this example to the tests script and ./Makefile

@willieyz willieyz force-pushed the add-no-stdlib-build branch 3 times, most recently from 4fdf64b to 2e4aaaa Compare August 15, 2025 10:42
@willieyz willieyz marked this pull request as ready for review August 15, 2025 11:07
@willieyz willieyz requested a review from a team as a code owner August 15, 2025 11:07
@mkannwischer mkannwischer marked this pull request as draft August 15, 2025 11:09
Copy link
Contributor

Choose a reason for hiding this comment

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

This README still needs to be adjusted

Copy link
Contributor Author

@willieyz willieyz Aug 15, 2025

Choose a reason for hiding this comment

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

Yes, thanks for the reminder!
I have addressed this and re-pushed the changes,
including

  • examples/README.md,
  • examples/multilevel_build_no_stdlib/README.md
  • mlkem/README.md

and also added this example to base.yml for the CI tests.

@willieyz willieyz force-pushed the add-no-stdlib-build branch 4 times, most recently from faec912 to cebb880 Compare August 15, 2025 11:39
@willieyz willieyz marked this pull request as ready for review August 15, 2025 13:15
@willieyz willieyz force-pushed the add-no-stdlib-build branch 4 times, most recently from 709a22c to abfc2dc Compare August 22, 2025 02:46
@willieyz willieyz force-pushed the add-no-stdlib-build branch from abfc2dc to b9ee08d Compare August 23, 2025 03:34
@willieyz willieyz force-pushed the add-no-stdlib-build branch 2 times, most recently from 37163aa to e847379 Compare September 7, 2025 18:35
Copy link
Contributor

@mkannwischer mkannwischer left a comment

Choose a reason for hiding this comment

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

I am fine with the changes now (except for a small nit), but this PR conflicts with #1185. Please rebase on top of that one.

@willieyz willieyz force-pushed the add-no-stdlib-build branch 5 times, most recently from 309dd25 to 4c8e5be Compare September 17, 2025 02:53
Copy link
Contributor

@mkannwischer mkannwischer left a comment

Choose a reason for hiding this comment

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

Please rebase this on top of main.

@willieyz willieyz force-pushed the add-no-stdlib-build branch 2 times, most recently from e3adae2 to e1f2117 Compare September 18, 2025 03:23
Copy link
Contributor

@mkannwischer mkannwischer left a comment

Choose a reason for hiding this comment

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

Thanks @willieyz. I am fine with the code changes now.
I found a small typo in the READMEs that was pre-existing before your PR, but maybe we can sort that out in a separate commit everywhere?

willieyz added a commit that referenced this pull request Sep 18, 2025
…2/768/1024}`

- This typo was pre-existing before this PR #1153, we sort this out with a separate commit

Signed-off-by: willieyz <[email protected]>
Copy link
Contributor

@mkannwischer mkannwischer left a comment

Choose a reason for hiding this comment

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

Small correction of the grammar. Then this is good to go.
Thanks @willieyz!

willieyz added a commit that referenced this pull request Sep 19, 2025
…2/768/1024}`

- This typo was pre-existing before this PR #1153, we sort this out with a separate commit

Signed-off-by: willieyz <[email protected]>
Copy link
Contributor

@mkannwischer mkannwischer left a comment

Choose a reason for hiding this comment

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

Thanks @willieyz. I'm happy with this PR now.
@hanno-becker - what do you think? Note that the second commit (renaming) is somewhat unrelated and requested by me.

willieyz added a commit that referenced this pull request Sep 24, 2025
…2/768/1024}`

- This typo was pre-existing before this PR #1153, we sort this out with a separate commit

Signed-off-by: willieyz <[email protected]>
- This commit add an example demonstrating how to build mlkem-native without the standard library (-nostdlib)
- Create an example folder named `multilevel_build_no_stdlib`
- Add the `example_no_stdlib_config.h` reference from `test/custom_stdlib_config.h`,
  this config provide custom implementations for mlk_memcpy and mlk_memset
- Add the `-nostdlib` cflag during generating objects file.
- Integrate this example to the `tests` script and ./Makefile
- Add this example to the `base.yml` for CI testing

Signed-off-by: willieyz <[email protected]>
…2/768/1024}`

- This typo was pre-existing before this PR #1153, we sort this out with a separate commit

Signed-off-by: willieyz <[email protected]>
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 no-stdlib build for mlkem-native

3 participants