Skip to content

xcframeworkにmacOS向けのライブラリも同梱する#1056

Merged
qryxip merged 10 commits intoVOICEVOX:mainfrom
yamachu:include-macos-to-xcframework
Apr 7, 2025
Merged

xcframeworkにmacOS向けのライブラリも同梱する#1056
qryxip merged 10 commits intoVOICEVOX:mainfrom
yamachu:include-macos-to-xcframework

Conversation

@yamachu
Copy link
Member

@yamachu yamachu commented Mar 26, 2025

内容

ReleaseでiOS向けにxcframeworkを提供しているが、このxcframeworkにmacOS向けのライブラリも同梱する。
これにより単一のxcframeworkに依存するだけでiOSでもmacOSでもvoicevox_coreを利用することが可能となる。

関連 Issue

close #1050

その他

forkリポジトリでWorkflowを回した結果がこちら

https://github.com/yamachu/voicevox_core/actions/runs/14240126690/job/39908553619
https://github.com/yamachu/voicevox_core/releases/tag/999.999.999-preview.999

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iosのみではなくなったため、ファイル名からiosを削除している

@qryxip
Copy link
Member

qryxip commented Mar 30, 2025

@PickledChair, @nekomimimi
もしよければですが、レビュー・アドバイス頂けると大変助かります…!

Copy link
Contributor

@nekomimimi nekomimimi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewを書いてサブミットする必要があるのを忘れてました💦
(見えてなかったですよね。すみません)

Copy link
Contributor

@nekomimimi nekomimimi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1056 (comment)
上記のように13.0と考えたのですが、11.0も自然かなと思いました。

使う人から考えるとどうせ使えないから13.0にするという方向も気が利いていて、
依存関係を純粋に考えれば、単体ごとにvoicevox coreは11.0でonnxruntimeが13.0なのだからそのままでも自然なのかなと。

どっちが良いのかわかりません。

Copy link
Contributor

@nekomimimi nekomimimi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

わかりやすいと思います✨

Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(文脈あまりわかってないのでとりあえずコメントだけ!!)

Copy link
Member

@qryxip qryxip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

マージは @qryxip さんにお任せします!
(コミットメッセージを @qryxip さんが整えるという運用を試しています)

echo "* Copy Framework-${arch} template"
mkdir -p "Framework-${arch}/voicevox_core.framework/Headers"
cp -vr "crates/voicevox_core_c_api/xcframework/Frameworks/${arch}/" "Framework-${arch}/"
if grep -q -e '^#define VOICEVOX_LINK_ONNXRUNTIME$' -e '^//#define VOICEVOX_LOAD_ONNXRUNTIME$' "${artifact}/include/voicevox_core.h"; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(ただのコメントです)

ここヘッダーとビルド段階で空中配線されてるの忘れそうな気もするんですよね〜…。
かといって良い方法は思いつきませんが…。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これはおっしゃる通りですね…
https://github.com/VOICEVOX/voicevox_core/pull/1056/files#diff-6cac996fad9fcf83b334d8f31d6ed423ab39d8ef30a8cd0676c1fd0e6922241bR60

この辺りにlink_onnxruntime_platformは必ず長さ1以上であるみたいなassertionを挟む…ぐらいしかパッと思いつかなかったです

@qryxip qryxip merged commit 96595d5 into VOICEVOX:main Apr 7, 2025
29 checks passed
@yamachu yamachu deleted the include-macos-to-xcframework branch April 10, 2025 13:56
qryxip added a commit that referenced this pull request Aug 2, 2025
#1056 はリリースアセット名の変更という破壊的変更をもたらすため、バージョ
ン0.17以降に延期する。

経緯は
#1113 (comment)

Closes: #1113
@qryxip qryxip mentioned this pull request Jan 31, 2026
29 tasks
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.

iOSだけではなく、macOS向けのライブラリも同梱したxcframeworkがあると嬉しい

5 participants