Skip to content

✨ Imports with namespacing, pub/use#216

Draft
LesterEvSe wants to merge 13 commits intoBlockstreamResearch:masterfrom
LesterEvSe:feature/imports
Draft

✨ Imports with namespacing, pub/use#216
LesterEvSe wants to merge 13 commits intoBlockstreamResearch:masterfrom
LesterEvSe:feature/imports

Conversation

@LesterEvSe
Copy link
Collaborator

@LesterEvSe LesterEvSe commented Feb 10, 2026

Motivation

The main goal of this PR is to enable an analogue of the OpenZeppelin library to exist in the SimplicityHL ecosystem. By introducing official compiler support for imports, we significantly increase code reusability and speed up application development. For projects heavily focused on security, this also allows developers to eventually "flatten" the code and audit all functions without external dependencies.

Checklist

  • Visibility: Added pub and pub use to control local scope versus re-exporting.
  • Import Syntax: Implemented parsing and resolution for use m::name; and explicit aliasing (as).
  • Collision Handling: Enforced strict errors for local scope collisions, utilizing C3 linearization for resolving re-export conflicts.
  • Transitive Dependencies: Add support for libraries importing other libraries.
  • Documentation: Сode comments are updated accordingly.
  • Quality Assurance: Code is formatted, all tests pass, and CI shows no errors.

@LesterEvSe LesterEvSe requested a review from delta1 as a code owner February 10, 2026 17:17
@LesterEvSe LesterEvSe force-pushed the feature/imports branch 3 times, most recently from 794325d to 673e287 Compare February 16, 2026 15:31
@LesterEvSe LesterEvSe requested a review from KyrylR February 24, 2026 08:03
@LesterEvSe LesterEvSe self-assigned this Feb 24, 2026
@LesterEvSe LesterEvSe added the enhancement New feature or request label Feb 24, 2026
@LesterEvSe LesterEvSe linked an issue Feb 24, 2026 that may be closed by this pull request
@LesterEvSe LesterEvSe added the bug Something isn't working label Feb 25, 2026
@LesterEvSe LesterEvSe force-pushed the feature/imports branch 2 times, most recently from 04f3132 to 98cdec8 Compare March 2, 2026 13:00
@LesterEvSe LesterEvSe removed the request for review from delta1 March 2, 2026 13:00
@LesterEvSe LesterEvSe assigned Sdoba16 and unassigned Sdoba16 and LesterEvSe Mar 2, 2026
@LesterEvSe LesterEvSe removed the bug Something isn't working label Mar 5, 2026
@apoelstra
Copy link
Contributor

CI is failing. Also, can you add a description or motivation to this PR?

@LesterEvSe
Copy link
Collaborator Author

CI is failing. Also, can you add a description or motivation to this PR?

I have updated the main PR description to include the detailed motivation for issue #155 and a technical breakdown of the import semantics introduced here.

Regarding the failing CI, @Sdoba16 and I are looking into that now. It will be fixed soon.

@LesterEvSe LesterEvSe marked this pull request as draft March 9, 2026 15:47
@Sdoba16 Sdoba16 force-pushed the feature/imports branch 2 times, most recently from a5f415a to a2e29d5 Compare March 10, 2026 07:53
@LesterEvSe LesterEvSe requested a review from apoelstra March 11, 2026 15:18
@Sdoba16 Sdoba16 force-pushed the feature/imports branch 4 times, most recently from 6284181 to 2ee0274 Compare March 12, 2026 12:50
@LesterEvSe LesterEvSe force-pushed the feature/imports branch 2 times, most recently from 74cc5a5 to bae899e Compare March 13, 2026 09:58
@LesterEvSe LesterEvSe force-pushed the feature/imports branch 7 times, most recently from ce8d6c3 to 338b622 Compare March 13, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add imports with namespacing, pub/use, and C3 linearization

3 participants