Skip to content

fix: the hash groups are sub-modules (mwrap-3.6.8.1) - #1

Merged
Sunrisepeak merged 2 commits into
mainfrom
fix/submodules
Nov 30, 2026
Merged

Sunrisepeak merged 2 commits into
mainfrom
fix/submodules

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

What

Each hash group is now its own module — mcpplibs.mwrap.mbedtls.sha256, .sha512, .sha1, .md5, .sha3, .md — and the root mcpplibs.mwrap.mbedtls re-exports the six.

Why

Until now the groups were partitions of the root (export module mcpplibs.mwrap.mbedtls:sha256;), so an importer could only take the root. The README (import mcpplibs.mwrap.mbedtls.sha256;) and the mwrap spec (root module + sub-modules, mcpplibs.mwrap.<lib>.<group>) both say otherwise; the first consumer to try the sub-module (xgit) got module 'mcpplibs.mwrap.mbedtls.sha256' not found.

Changes

  • tools/generate.py writes export module mcpplibs.mwrap.mbedtls.<group>;; the six src/*.cppm regenerated (--check ok in CI).
  • src/mbedtls.cppm: export import mcpplibs.mwrap.mbedtls.<group>; for the six.
  • tests/submodule_test.cpp: imports .sha256 alone, one-shot and streaming.
  • mcpp.toml: version 3.6.8.1 (a wrapper revision: one digit after the upstream version, per the mwrap rule); the description names the sub-module form.
  • .tmp_tt.py (a leftover scratch script) removed.

Verification

  • mcpp test locally: 4 programs (api_test, header_mix_test, linked, submodule_test), all ok.

Authorship: ai-and-human

…c name them (mwrap-3.6.8.1)

Until now each group was a partition of the root (mcpplibs.mwrap.mbedtls:sha256), so the README's `import mcpplibs.mwrap.mbedtls.sha256;` did not compile: an importer could only take the root. Each group is now its own module and the root re-exports the six; tests/submodule_test.cpp imports sha256 alone. A consumer met this combining the wrap with the first real use (xgit).
@Sunrisepeak
Sunrisepeak merged commit f84ce1d into main Nov 30, 2026
6 checks passed
@Sunrisepeak
Sunrisepeak deleted the fix/submodules branch November 30, 2026 23:38
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.

1 participant