hugr_core

Module extension

Source
Expand description

Extensions

TODO: YAML declaration and parsing. This should be similar to a plugin system (outside the types module), which also parses nested OpDefs.

Re-exports§

  • pub use prelude::PRELUDE;
  • pub use prelude::PRELUDE;
  • pub use prelude::PRELUDE_REGISTRY;
  • pub use prelude::PRELUDE_REGISTRY;

Modules§

Structs§

  • Encode a signature as PolyFuncTypeRV but with additional validation of type arguments via a custom binary. The binary cannot be serialized so will be lost over a serialization round-trip.
  • A extension is a set of capabilities required to execute a graph.
  • Extension Registries store extensions to be looked up e.g. during validation.
  • A set of extensions identified by their unique ExtensionId.
  • A constant value provided by a extension. Must be an instance of a type available to the extension.
  • Type holding a boxed const-folding function.
  • Serializable definition for dynamically loaded operations.
  • A declaration of an opaque type. Note this does not provide any way to create instances
  • SemVer version as defined by https://semver.org.

Enums§

Constants§

  • A special ExtensionId which indicates that the delta of a non-Function container node should be computed by extension inference.

Statics§

  • An Extension Registry containing no extensions.

Traits§

  • Trait implemented by extension operations that can perform constant folding.
  • Trait necessary for binary computations of OpDef signature
  • Compute signature of OpDef given type arguments.
  • Trait for validating type arguments to a PolyFuncTypeRV beyond conformation to declared type parameter (which should have been checked beforehand), given just the arguments.
  • Trait for validating type arguments to a PolyFuncTypeRV beyond conformation to declared type parameter (which should have been checked beforehand).

Functions§

Type Aliases§

  • Output of constant folding an operation, None indicates folding was either not possible or unsuccessful. An empty vector indicates folding was successful and no values are output.
  • A unique identifier for a extension.