|
3 | 3 | # University of Illinois/NCSA Open Source License. Both these licenses can be
|
4 | 4 | # found in the LICENSE file.
|
5 | 5 |
|
6 |
| -# https://dawn.googlesource.com/dawn/+/80062b708e44aa4d8c48e555ed0cc801396069f6/src/emdawnwebgpu/pkg/README.md |
| 6 | +# https://dawn.googlesource.com/dawn/+/faa7054b5b65c3ce3774151952a68aa7668aa20b/src/emdawnwebgpu/pkg/README.md |
7 | 7 | r"""
|
8 |
| -The full README of Emdawnwebgpu follows. |
| 8 | +This "remote port" instructs Emscripten (4.0.10+) how to automatically download |
| 9 | +the actual port for Emdawnwebgpu. See README below for instructions. |
9 | 10 |
|
10 | 11 | # Emdawnwebgpu
|
11 | 12 |
|
|
84 | 85 |
|
85 | 86 | --closure-args=--externs=path/to/emdawnwebgpu_pkg/webgpu/src/webgpu-externs.js
|
86 | 87 |
|
| 88 | +#### Without using a port file (**Unsupported!**) |
| 89 | +
|
| 90 | +It is possible to integrate the Emdawnwebgpu sources directly into your build |
| 91 | +process, which may be necessary for certain build systems, but this is not |
| 92 | +officially supported. Using a port file instead is strongly recommended. |
| 93 | +
|
| 94 | +If you do this, the port files or Dawn's GN or CMake files can serve as a |
| 95 | +reference for the steps needed. Note that in all cases, the sources include both |
| 96 | +C++ and JS code. While it is possible to precompile the C++ code to `.a`, the JS |
| 97 | +code cannot be precompiled and must be provided at the final link step. |
| 98 | +
|
87 | 99 | ### Cross-targeting Web/Native
|
88 | 100 |
|
89 | 101 | #### Using CMake
|
|
132 | 144 | package zip).
|
133 | 145 | """
|
134 | 146 |
|
135 |
| -TAG = 'v20250807.221415' |
| 147 | +import sys |
| 148 | + |
| 149 | +if __name__ == '__main__': |
| 150 | + print('Please see documentation inside this file for details on how to use this port.') |
| 151 | + sys.exit(1) |
136 | 152 |
|
137 |
| -EXTERNAL_PORT = f'https://github.com/google/dawn/releases/download/{TAG}/emdawnwebgpu_pkg-{TAG}.zip' |
138 |
| -SHA512 = 'ab9f3af2536ef3a29c20bb9c69f45b5ee512b8e33fb559f8d0bf4529cd2c11e2fbfb919c3d936e3b32af0e92bd710af71a1700776b5e56c99297cfbc3b73ceec' |
| 153 | +_VERSION = 'v20250926.144300' |
| 154 | + |
| 155 | +# Remote-specific port information |
| 156 | + |
| 157 | +# - Where to download the port |
| 158 | +EXTERNAL_PORT = f'https://github.com/google/dawn/releases/download/{_VERSION}/emdawnwebgpu_pkg-{_VERSION}.zip' |
| 159 | +# - Hash to verify the download integrity |
| 160 | +SHA512 = 'a186cf7f33266c9dfeca7d99ffac769a91b2129e34054f1e857cd82e8b033896da34cf758088bbdeeb128aa713df9953851f83ba6d677c438a929d245a789948' |
| 161 | +# - Path of the port inside the zip file |
139 | 162 | PORT_FILE = 'emdawnwebgpu_pkg/emdawnwebgpu.port.py'
|
140 | 163 |
|
141 |
| -# Port information (required) |
| 164 | +# General port information |
142 | 165 |
|
143 | 166 | # - Visible in emcc --show-ports and emcc --use-port=emdawnwebgpu:help
|
144 | 167 | LICENSE = "Some files: BSD 3-Clause License. Other files: Emscripten's license (available under both MIT License and University of Illinois/NCSA Open Source License)"
|
145 | 168 |
|
146 | 169 | # - Visible in emcc --use-port=emdawnwebgpu:help
|
147 | 170 | DESCRIPTION = "Emdawnwebgpu implements webgpu.h on WebGPU, replacing -sUSE_WEBGPU. **For info on usage and filing feedback, see link below.**"
|
148 |
| -URL = 'https://dawn.googlesource.com/dawn/+/80062b708e44aa4d8c48e555ed0cc801396069f6/src/emdawnwebgpu/pkg/README.md' |
| 171 | +URL = 'https://dawn.googlesource.com/dawn/+/faa7054b5b65c3ce3774151952a68aa7668aa20b/src/emdawnwebgpu/pkg/README.md' |
| 172 | + |
| 173 | +# Emscripten <4.0.10 won't notice EXTERNAL_PORT and will try to use this. |
| 174 | +def get(ports, settings, shared): |
| 175 | + raise Exception('Remote ports require Emscripten 4.0.10+.') |
| 176 | +def clear(ports, settings, shared): |
| 177 | + pass |
0 commit comments