Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Package dawn artifacts/required files into xcframework for easier integration#13

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
SoylentGraham wants to merge21 commits intohenrybetts:main
base:main
Choose a base branch
Loading
fromNewChromantics:AddDylibDependency

Conversation

@SoylentGraham
Copy link

@SoylentGrahamSoylentGraham commentedNov 5, 2024
edited
Loading

Improvement

These changes to the package setup mean thedylib, dawn headers, anddawn.json are all bundled into an.xcframework which SPM consumes quite nicely.

  • Now we don't need any files added to the sytem in/usr/local etc
    • dylib & dawn headers inxcframework
    • pkgconfig replaced withpublicHeadersPath andwebgpu.h to generate the webgpu symbols (egWGPUBool)
  • This can later move so thexcframework can come from an URL (ie. github workflow -> release, and automate creation from dawn's own code)
  • This now automatically includes thedylib into any product of a project that requires it (currently the setup fails as thedylib isn't bundled with any projects)
  • WebGPU C->Swift symbols now come viapublicHeadersPath inCWebGPU and requirewebgpu.h (and ONLY this header)

User Instructions

  • Build dawn as before, but copy
    • libwebgpu_dawn.dylib
    • dawn'sinclude/
    • dawn'sdawn.json
  • IntoSources/DawnNative/ and then runcd Soruces/DawnNaive && ./CreateXCFramework.sh
  • This will generate aSources/DawnNative/webgpu_dawn.xcframework
  • The Swift package then gets all it's dependencies from the xcframework when building

Todo

  • Make a seperate repos for xcframework generation
  • Update readme

@SoylentGrahamSoylentGraham marked this pull request as draftNovember 5, 2024 18:30
@SoylentGraham
Copy link
Author

SoylentGraham commentedNov 6, 2024
edited
Loading

Currently xcode fails to Archive (for app store) any projects - not sure if this is related to my changes or not

dyld[38443]: Library not loaded: @rpath/ArgumentParser_39B7DAEE4DD359BE_PackageProduct.framework/Versions/A/ArgumentParser_39B7DAEE4DD359BE_PackageProduct  Referenced from: <BA83F552-06A5-33D1-B7AB-3C2508F3A7D9> /Volumes/Sandisk/Xcode_DerivedData/HenryBettsWebGpuDemo-doptxfxqkfjmwzefxxqpaktwloon/Build/Intermediates.noindex/ArchiveIntermediates/HenryBettsWebGpuDemo/IntermediateBuildFilesPath/UninstalledProducts/macosx/generate-webgpu  Reason: tried: '/usr/lib/swift/ArgumentParser_39B7DAEE4DD359BE_PackageProduct.framework/Versions/A/ArgumentParser_39B7DAEE4DD359BE_PackageProduct' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/ArgumentParser_39B7DAEE4DD359BE_PackageProduct.framework/Versions/A/ArgumentParser_39B7DAEE4DD359BE_PackageProduct' (no such file), '/usr/lib/swift/ArgumentParser_39B7DAEE4DD359BE_PackageProduct.framework/Versions/A/ArgumentParser_39B7DAEE4DD359BE_PackageProduct' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/ArgumentParser_39B7DAEE4DD359BE_PackageProduct.framework/Versions/A/ArgumentParser_39B7DAEE4DD359BE_PackageProduct' (no such file)/Volumes/Sandisk/Xcode_DerivedData/HenryBettsWebGpuDemo-doptxfxqkfjmwzefxxqpaktwloon/Build/Intermediates.noindex/ArchiveIntermediates/HenryBettsWebGpuDemo/IntermediateBuildFilesPath/swift-webgpu.build/Release/WebGPU.build/Script-16908758398532019134.sh: line 20: 38443 Abort trap: 6           /usr/bin/sandbox-exec -p "(version 1)

edit: same error when buildingrelease

…bgpu exe - the@rpath config is weirdly missing from xcode when in releasehenrybetts#17
@SoylentGraham
Copy link
Author

To get the right artifacts, after building via ninja (as per current instructions), I cannot find the correct artifacts...
only when doingsudo ninja install can I find the.dylib and the correct includes.

todo:

  • Find where this dylib is (doesinstall do a final link??) and dont require/usr/lib install
  • find out which are the correct includes to be used with this script

@SoylentGraham
Copy link
Author

SoylentGraham commentedNov 12, 2024
edited
Loading

Current setup is building a hardcoded path to/Volumes/Code/dawn/out/Release/src/dawn/platform/libdawn_platform.dylib inlibwebgpu_dawn.framework/webgpu_dawn so clearing out dawn artifacts (or using on another system) fails

Need to fix this

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@SoylentGraham

[8]ページ先頭

©2009-2025 Movatter.jp