@@ -778,23 +778,26 @@ existing metadata, given the node ID.
778778` Ports ` (for port metadata) or ` History ` (for use by the rewrite
779779engine)?
780780
781+ Reserved metadata keys used by the HUGR tooling are prefixed with ` core. ` .
782+ Use of this prefix by external tooling may cause issues.
783+
781784#### Generator Metadata
782785Tooling generating HUGR can specify some reserved metadata keys to be used for debugging
783786purposes.
784787
785- The key ` __generator ` when used on the module root node is
788+ The key ` core.generator ` when used on the module root node is
786789used to specify the tooling used to generate the module.
787790The associated value must be an object/dictionary containing the fields ` name `
788791and ` version ` , each with string values. Extra fields may be used to include
789792additional data about generating tooling that may be useful for debugging. Example:
790793
791794``` json
792795{
793- "__generator " : { "name" : " my_compiler" , "version" : " 1.0.0" }
796+ "core.generator " : { "name" : " my_compiler" , "version" : " 1.0.0" }
794797}
795798```
796799
797- The key ` __used_extensions ` when used on the module root node is
800+ The key ` core.used_extensions ` when used on the module root node is
798801used to specify the names and versions of all the extensions used in the module.
799802Some of these may correspond to extensions packaged with the module, but they
800803may also be extensions the consuming tooling has pre-loaded. They can be used by the
@@ -803,7 +806,7 @@ must be an array of objects/dictionaries containing the keys `name` and `version
803806with string values. Example:
804807``` json
805808{
806- "__used_extensions " : [{ "name" : " my_ext" , "version" : " 2.2.3" }]
809+ "core.used_extensions " : [{ "name" : " my_ext" , "version" : " 2.2.3" }]
807810}
808811```
809812
0 commit comments