{"id":22458776,"url":"https://github.com/halildurmus/winmd","last_synced_at":"2026-02-23T01:11:12.657Z","repository":{"id":37956112,"uuid":"332547388","full_name":"halildurmus/winmd","owner":"halildurmus","description":"Inspect and generate Windows Metadata (.winmd) files based on the ECMA-335 standard.","archived":false,"fork":false,"pushed_at":"2025-05-22T10:24:51.000Z","size":231768,"stargazers_count":28,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-08T22:45:11.049Z","etag":null,"topics":["dart","flutter","metadata","win32","windows","winmd"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/halildurmus.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"halildurmus"}},"created_at":"2021-01-24T20:21:40.000Z","updated_at":"2025-06-02T16:59:21.000Z","dependencies_parsed_at":"2023-11-25T13:26:58.186Z","dependency_job_id":"d66cbecd-b56d-45bb-aff9-3734a991f190","html_url":"https://github.com/halildurmus/winmd","commit_stats":null,"previous_names":["halildurmus/winmd","dart-windows/winmd","timsneath/winmd"],"tags_count":68,"template":false,"template_full_name":null,"purl":"pkg:github/halildurmus/winmd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halildurmus%2Fwinmd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halildurmus%2Fwinmd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halildurmus%2Fwinmd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halildurmus%2Fwinmd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/halildurmus","download_url":"https://codeload.github.com/halildurmus/winmd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halildurmus%2Fwinmd/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264719228,"owners_count":23653540,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","flutter","metadata","win32","windows","winmd"],"created_at":"2024-12-06T08:14:17.921Z","updated_at":"2026-02-23T01:11:12.645Z","avatar_url":"https://github.com/halildurmus.png","language":"Dart","funding_links":["https://github.com/sponsors/halildurmus"],"categories":[],"sub_categories":[],"readme":"[![ci][ci_badge]][ci_link]\n[![Package: winmd][package_badge]][package_link]\n[![Publisher: halildurmus.dev][publisher_badge]][publisher_link]\n[![Language: Dart][language_badge]][language_link]\n[![License: BSD-3-Clause][license_badge]][license_link]\n[![codecov][codecov_badge_link]][codecov_link]\n\n**Inspect and generate [Windows Metadata (.winmd)][WinMD] files based on the\n[ECMA-335] standard.**\n\n`package:winmd` provides both low-level primitives and high-level abstractions\nfor working with `.winmd` files. It is a core component of Dart-based Windows\ninterop tooling — most notably powering **[package:win32]**.\n\n## ✨ Features\n\n- **Parse** `.winmd` files into rich, strongly-typed Dart object models\n- **Query** type definitions, methods, fields, and more across multiple metadata\n  sources\n- **Resolve** symbols quickly without knowing their namespace up front\n- **Merge** multiple `.winmd` files into a single, unified file\n- **Generate** `.winmd` files programmatically from scratch\n- **Cross-platform** — works on Windows, Linux, and macOS\n\n## ⚡ Quick Example\n\nThe example below loads WinRT metadata from a `.winmd` file and inspects a\nclass and an enum:\n\n```dart\nimport 'dart:io' as io;\n\nimport 'package:winmd/winmd.dart';\n\nvoid main() {\n  // Load WinRT metadata from a local .winmd file.\n  const winmdPath = r'C:\\WINDOWS\\System32\\WinMetadata\\Windows.Storage.winmd';\n  final bytes = io.File(winmdPath).readAsBytesSync();\n  final reader = MetadataReader.read(bytes);\n  final index = MetadataIndex.fromReader(reader);\n\n  // Optional: Use MetadataLookup for efficient type resolution by name.\n  // This is especially helpful when the namespace of the target type is\n  // unknown.\n  final metadata = MetadataLookup(index);\n\n  // Lookup a WinRT class (e.g., StorageFile) and list its public methods.\n  final storageFile = metadata.findSingleTypeByName('StorageFile');\n  print('WinRT class \"${storageFile.name}\" has the following methods:');\n  for (final method in storageFile.methods) {\n    print('  ${method.name}');\n  }\n  print('');\n\n  // Lookup a WinRT enum (e.g., FileAttributes) and display its members.\n  final enumType = metadata.findSingleTypeByName('FileAttributes');\n  print('WinRT enum \"${enumType.name}\" has the following fields:');\n\n  // The first field represents the underlying integral type (e.g., Int32).\n  final underlyingType = enumType.fields.first;\n  print('  ${underlyingType.name} = ${underlyingType.signature.type}');\n\n  // Subsequent fields are named values within the enum.\n  for (final field in enumType.fields.skip(1)) {\n    print('  ${field.name} = ${field.constant?.value}');\n  }\n}\n```\n\n## 📝 Documentation\n\nFull API reference is available here:\n\n👉 [API Reference][api_reference_link].\n\nAdditional usage examples are located in the [example] directory.\n\n## 🐞 Features and Bugs\n\nIf you encounter bugs or need additional functionality, please\n[file an issue][issue_tracker_link].\n\n[api_reference_link]: https://pub.dev/documentation/winmd/latest/\n[ci_badge]: https://github.com/halildurmus/winmd/actions/workflows/winmd.yml/badge.svg\n[ci_link]: https://github.com/halildurmus/winmd/actions/workflows/winmd.yml\n[codecov_badge_link]: https://codecov.io/gh/halildurmus/winmd/branch/main/graph/badge.svg?token=1ouz1Jr9nW\n[codecov_link]: https://codecov.io/gh/halildurmus/winmd\n[ECMA-335]: https://ecma-international.org/publications-and-standards/standards/ecma-335/\n[example]: https://github.com/halildurmus/winmd/tree/main/example\n[issue_tracker_link]: https://github.com/halildurmus/winmd/issues\n[language_badge]: https://img.shields.io/badge/language-Dart-blue.svg\n[language_link]: https://dart.dev\n[license_badge]: https://img.shields.io/github/license/halildurmus/winmd?color=blue\n[license_link]: https://opensource.org/licenses/BSD-3-Clause\n[package_badge]: https://img.shields.io/pub/v/winmd.svg\n[package_link]: https://pub.dev/packages/winmd\n[publisher_badge]: https://img.shields.io/pub/publisher/winmd.svg\n[publisher_link]: https://pub.dev/publishers/halildurmus.dev\n[package:win32]: https://pub.dev/packages/win32\n[WinMD]: https://learn.microsoft.com/uwp/winrt-cref/winmd-files\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalildurmus%2Fwinmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalildurmus%2Fwinmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalildurmus%2Fwinmd/lists"}