Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check c2a-core version header in Rust build script #573

Merged
merged 1 commit into from
May 17, 2023

Conversation

sksat
Copy link
Collaborator

@sksat sksat commented May 17, 2023

概要

c2a_core_main.h で定義されるバージョン情報を Rust の build script から読んで検証する

Issue

詳細

  • clang-rs を用いて c2a_core_main.h をパースし,C2A_CORE_VER_MAJOR 等を Rust から読み込む
    • define macro はあくまで preprocess で AST には直接出てこないので,多少自前でパースしてやる必要はある
  • crate の package.version と一致しているか検証(assert_eq()
    • 不一致の場合,cargo build がコケる

補足

CI は Rust のビルド CI として別途追加する

@sksat sksat added enhancement New feature or request tools labels May 17, 2023
@sksat sksat self-assigned this May 17, 2023
@sksat sksat changed the title Check c2a-core version header from Rust build script Check c2a-core version header in Rust build script May 17, 2023
@sksat sksat requested a review from meltingrabbit May 17, 2023 07:58
@sksat sksat mentioned this pull request May 17, 2023
@sksat
Copy link
Collaborator Author

sksat commented May 17, 2023

@meltingrabbit meltingrabbit added the priority::medium priority medium label May 17, 2023
@sksat sksat merged commit f3f2578 into develop May 17, 2023
@sksat sksat deleted the feature/check-core-version-rs branch May 17, 2023 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority::medium priority medium tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants