Skip to content

OQSBuilder checkpoint: reproduce ML-KEM integrations#2348

Open
xuganyu96 wants to merge 18 commits intogyx-oqsbuilderfrom
gyx-oqsbuilder-structured-oqsbuildfile
Open

OQSBuilder checkpoint: reproduce ML-KEM integrations#2348
xuganyu96 wants to merge 18 commits intogyx-oqsbuilderfrom
gyx-oqsbuilder-structured-oqsbuildfile

Conversation

@xuganyu96
Copy link
Contributor

This pull request reproduces ML-KEM integration from mlkem-native, cupqc, and icicle.

OQSBuilder aims to improve upon copy_from_upstream.py by clarifying the data flow from oqsbuildfile.yml (previously copy_from_upstream.yml) into Python data structures, then into actions such as cloning upstream repositories and rendering internal CMakeLists.txt/source/header files from Jinja templates.

Reviewers might find it easier to start with oqsbuilder/__main__.py and read through the code.

Feedback on design choices is very much appreciated.

NOTE: I have not gotten implementing fetching file list from remote META.yml file, but this item is on the roadmap.

@xuganyu96 xuganyu96 marked this pull request as draft January 16, 2026 18:13
@xuganyu96 xuganyu96 requested a review from a team January 16, 2026 18:13
@xuganyu96 xuganyu96 marked this pull request as ready for review January 27, 2026 17:36
@xuganyu96 xuganyu96 force-pushed the gyx-oqsbuilder-structured-oqsbuildfile branch 13 times, most recently from dafceb6 to 4747772 Compare January 28, 2026 19:52
@dstebila dstebila added the needs review Looking for a(nother) review label Feb 10, 2026
&& apt-get install -y python3-venv \
&& python3 -m venv /.venv \
&& . /.venv/bin/activate \
&& pip install --upgrade pip wheel setuptools \

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 8: pipCommand not pinned by hash
Click Remediation section below to solve this issue
&& python3 -m venv /.venv \
&& . /.venv/bin/activate \
&& pip install --upgrade pip wheel setuptools \
&& pip install -r requirements.txt \

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 8: pipCommand not pinned by hash
Click Remediation section below to solve this issue
* Getting started with oqsbuilder. Can now clone some upstream remote repos

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>

* Fixed typos. Implemented dryrun for clone_remote_repo. Start tracking OQS Builder progress in oqsbuilder/README.md. [skip ci]

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>

---------

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
* Can apply one patch to one repository

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>

* Resolved issue where git reports "... is beyond a sym link" on repository content within Python's TemporaryDirectory

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>

* Removed argparse because it is currently a distraction, will add later

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>

* Can apply patches to upstreams; enabled patches in the build YML file

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>

* When not running oqsbuilder headlessly, use user prompts [skip ci]

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>

---------

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
Proof-of-concept re-production of ML-KEM integration

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
Started implementing structured OQSBuild class

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
…le generation

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
I had an idea for incrementally deploying OQSBuilder. In short, "copy
from upstream" will now contain two steps: first run the legacy script
`copy_from_upstream.py`, then run OQSBuilder. Hence the change in the
"basic check" to run OQSBuilder in basic.yml's upstreamcheck.

OQSBuilder has a separate set of Python dependencies specified in
oqsbuilder/dev-requirements. Some of them (i.e. gersemi) are not
available from Ubuntu's system package manager, so I chose to install
python3-venv, then use pip inside a virtual environment.

Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
@xuganyu96 xuganyu96 force-pushed the gyx-oqsbuilder-structured-oqsbuildfile branch from 19c4bb0 to 03845a1 Compare February 17, 2026 15:20
@xuganyu96 xuganyu96 requested a review from alexrow as a code owner February 17, 2026 15:20
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
icicle_cuda:
enable_by: OQS_USE_ICICLE

copies:
Copy link
Member

Choose a reason for hiding this comment

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

This is going to get quite large. Would it be useful to break copies out into its own file? Or possibly one YML file for each entry within copies, e.g., mldsa-native_x86_64, ...

- 🔨 render documentation
- 🔨 !!! ML-DSA !!!
- ✅ Parse `oqsbuildfile.yml` into structured data instead of Python dictionary
- 🔨 Consider documenting oqsbuildfile's schema in Python code
Copy link
Member

Choose a reason for hiding this comment

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

Yes, I think some documentation of oqsbuildfile.yml's schema will be necessary so that others will know how to use it. Would a Markdown file be better than in the Python code?

There are tools for codifying a scheme for a YAML file and also validating a YAML file against a schema, e.g., https://github.com/yaml-schema/yaml-schema. I don't know if that's overkill.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs review Looking for a(nother) review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments