Skip to content

Add imports functionality#264

Draft
KyrylR wants to merge 4 commits intomasterfrom
dev/imports
Draft

Add imports functionality#264
KyrylR wants to merge 4 commits intomasterfrom
dev/imports

Conversation

@KyrylR
Copy link
Copy Markdown
Collaborator

@KyrylR KyrylR commented Apr 1, 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.

Related PRs (in order of the merge): #260, #256, #265, #266

@KyrylR KyrylR changed the title feat: add pub and use keywords and parse them Add imports functionality Apr 1, 2026
@KyrylR
Copy link
Copy Markdown
Collaborator Author

KyrylR commented Apr 1, 2026

Reopened instead of #258

@LesterEvSe LesterEvSe self-assigned this Apr 1, 2026
@LesterEvSe LesterEvSe added the enhancement New feature or request label Apr 1, 2026
@apoelstra
Copy link
Copy Markdown
Contributor

026c0ff needs rebase

@LesterEvSe LesterEvSe force-pushed the dev/imports branch 3 times, most recently from ce70a8b to 47cc303 Compare April 2, 2026 09:27
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.

3 participants