1 header = """/* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */"""
4 autogen_warning = """/* DO NOT MODIFY THIS MANUALLY! This file was generated using cbindgen.
5 * To generate this file:
6 * 1. Get the latest cbindgen using `cargo install --force cbindgen`
7 * a. Alternatively, you can clone `https://github.com/eqrion/cbindgen` and use a tagged release
8 * 2. Run `rustup run nightly cbindgen toolkit/library/rust/ --lockfile Cargo.lock --crate wgpu_bindings -o dom/webgpu/ffi/wgpu_ffi_generated.h`
12 typedef uint64_t WGPUNonZeroU64;
13 typedef uint64_t WGPUOption_BufferSize;
14 typedef uint32_t WGPUOption_NonZeroU32;
15 typedef uint8_t WGPUOption_NonZeroU8;
16 typedef uint64_t WGPUOption_AdapterId;
17 typedef uint64_t WGPUOption_BufferId;
18 typedef uint64_t WGPUOption_PipelineLayoutId;
19 typedef uint64_t WGPUOption_BindGroupLayoutId;
20 typedef uint64_t WGPUOption_SamplerId;
21 typedef uint64_t WGPUOption_SurfaceId;
22 typedef uint64_t WGPUOption_TextureViewId;
24 include_version = true
34 "Option_AdapterId", "Option_BufferId", "Option_PipelineLayoutId", "Option_BindGroupLayoutId",
35 "Option_SamplerId", "Option_SurfaceId", "Option_TextureViewId",
36 "Option_BufferSize", "Option_NonZeroU32", "Option_NonZeroU8",
37 "ANativeWindow_setBuffersGeometry",
41 "BufferDescriptor_RawString" = "BufferDescriptor"
42 "CommandBufferDescriptor_RawString" = "CommandBufferDescriptor"
43 "CommandEncoderDescriptor_RawString" = "CommandEncoderDescriptor"
44 "RenderBundleDescriptor_RawString" = "RenderBundleDescriptor"
45 "DeviceDescriptor_RawString" = "DeviceDescriptor"
46 "TextureDescriptor_RawString" = "TextureDescriptor"
47 "SamplerDescriptor_RawString" = "SamplerDescriptor"
51 include = ["wgpu-core", "wgpu-types", "wgpu-hal"]
53 extra_bindings = ["wgpu-core", "wgpu-types", "wgpu-hal"]
56 prefix = "WGPU_INLINE"
59 rename_args = "GeckoCase"
65 prefix_with_name = true
66 derive_helper_methods = true
73 "target_os = windows" = "XP_WIN"
74 "target_os = macos" = "XP_MACOSX"
75 "target_os = android" = "ANDROID"