Skip to content

feat!: Joint compilation of Guppy symbols to a library#1495

Merged
maximilianruesch merged 182 commits intomainfrom
mr/feat/compile-library
Apr 8, 2026
Merged

feat!: Joint compilation of Guppy symbols to a library#1495
maximilianruesch merged 182 commits intomainfrom
mr/feat/compile-library

Conversation

@maximilianruesch
Copy link
Copy Markdown
Collaborator

@maximilianruesch maximilianruesch commented Feb 12, 2026

Allows collecting symbols annotated with @guppy into a GuppyLibrary, that can be compiled together. So far supports only function definitions, declarations and structs (but this is not yet checked anywhere).

Also adds a is_decl function to GuppyFunctionDefinition to check whether a function is a declaration (i.e. has no body) or not. This will allow distinguishing between headers and implementations on a per-symbol level. This may be splittered into a separate PR.

This PR requires Quantinuum/hugr#2947 to be released and pulled into Guppy.

Closes #960

BREAKING CHANGE: Internal breaks to compilation engine interface. No user action is required.

BEGIN_COMMIT_OVERRIDE
feat: Joint compilation of Guppy symbols to a library
END_COMMIT_OVERRIDE

# Conflicts:
#	guppylang-internals/src/guppylang_internals/checker/func_checker.py
#	guppylang-internals/src/guppylang_internals/compiler/core.py
#	guppylang-internals/src/guppylang_internals/engine.py
#	guppylang-internals/src/guppylang_internals/tracing/object.py
@maximilianruesch maximilianruesch changed the base branch from main to mr/refactor/type-member April 2, 2026 15:56
Base automatically changed from mr/refactor/type-member to main April 2, 2026 16:03
@maximilianruesch
Copy link
Copy Markdown
Collaborator Author

Almost forgot: This needs the latest hugr-py, v0.16.0. This in turn requires a tket-py release. Both need to be upgraded in this repository before this PR can be merged.

Otherwise, this is ready to go 👍

@maximilianruesch maximilianruesch changed the base branch from main to mr/feat/update-hugr-py April 8, 2026 09:18
Base automatically changed from mr/feat/update-hugr-py to main April 8, 2026 13:48
@maximilianruesch maximilianruesch added this pull request to the merge queue Apr 8, 2026
@maximilianruesch maximilianruesch changed the title feat!: Allow joint compilation of Guppy symbols to a library feat!: Joint compilation of Guppy symbols to a library Apr 8, 2026
@maximilianruesch maximilianruesch removed this pull request from the merge queue due to a manual request Apr 8, 2026
@maximilianruesch maximilianruesch added this pull request to the merge queue Apr 8, 2026
Merged via the queue into main with commit 0adefdb Apr 8, 2026
13 checks passed
@maximilianruesch maximilianruesch deleted the mr/feat/compile-library branch April 8, 2026 13:59
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 guppy libraries to enforce joint compilation of definitions

6 participants