Skip to content

Add app metadata introspection APIs#703

Open
TheHypnoo wants to merge 6 commits into
PerryTS:mainfrom
TheHypnoo:feat/issue-673-app-metadata
Open

Add app metadata introspection APIs#703
TheHypnoo wants to merge 6 commits into
PerryTS:mainfrom
TheHypnoo:feat/issue-673-app-metadata

Conversation

@TheHypnoo
Copy link
Copy Markdown
Contributor

Summary

  • Add getAppVersion(), getAppBuildNumber(), and getBundleId() to perry/system.
  • Read app metadata from perry.toml during compilation and bake it into the LLVM backend as compile-time metadata.
  • Wire the new APIs through dispatch, API manifest, object cache invalidation, and TypeScript declarations.
  • Add regression coverage for default metadata fallback and perry.toml parsing.

Why

Apps already define project.version, project.build_number, and bundle identifiers in perry.toml, but there was no runtime-facing API to read those values from TypeScript. This made apps duplicate metadata in hand-maintained constants, which can drift between releases.

This implements the feature requested in #673 by exposing the values through perry/system while keeping perry.toml as the source of truth.

Validation

  • cargo test -p perry app_metadata_tests --quiet
  • cargo check -p perry-codegen --quiet
  • cargo test -p perry-dispatch --quiet
  • rustfmt --check on touched Rust files
  • Manual end-to-end compile/run for the fallback path
  • Manual end-to-end compile/run with a temporary perry.toml, confirming 9.8.7, 123, and the target-specific bundle id are returned

Closes #673

@TheHypnoo TheHypnoo force-pushed the feat/issue-673-app-metadata branch from 12e6e04 to 4e9da56 Compare May 11, 2026 18:10
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.

Feature request: runtime API to read app version from perry.toml

1 participant