diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dccf3c83..a190329a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,11 @@ name: ci on: [pull_request, push] +env: + RUST_BACKTRACE: 1 + CARGO_INCREMENTAL: 0 + RUSTFLAGS: "-Cdebuginfo=0 --deny=warnings" + jobs: build: runs-on: macos-latest diff --git a/examples/reflection/main.rs b/examples/reflection/main.rs index efe9fc29..058199cc 100644 --- a/examples/reflection/main.rs +++ b/examples/reflection/main.rs @@ -8,36 +8,36 @@ use metal::*; use objc::rc::autoreleasepool; -const PROGRAM: &'static str = " - #include \n\ +const PROGRAM: &'static str = r" + #include - using namespace metal;\n\ + using namespace metal; - typedef struct {\n\ - float2 position;\n\ - float3 color;\n\ - } vertex_t;\n\ + typedef struct { + float2 position; + float3 color; + } vertex_t; - struct ColorInOut {\n\ - float4 position [[position]];\n\ - float4 color;\n\ - };\n\ + struct ColorInOut { + float4 position [[position]]; + float4 color; + }; - vertex ColorInOut vs(device vertex_t* vertex_array [[ buffer(0) ]],\n\ - unsigned int vid [[ vertex_id ]])\n\ - {\n\ - ColorInOut out;\n\ + vertex ColorInOut vs(device vertex_t* vertex_array [[ buffer(0) ]], + unsigned int vid [[ vertex_id ]]) + { + ColorInOut out; - out.position = float4(float2(vertex_array[vid].position), 0.0, 1.0);\n\ - out.color = float4(float3(vertex_array[vid].color), 1.0);\n\ + out.position = float4(float2(vertex_array[vid].position), 0.0, 1.0); + out.color = float4(float3(vertex_array[vid].color), 1.0); - return out;\n\ - }\n\ + return out; + } - fragment float4 ps(ColorInOut in [[stage_in]])\n\ - {\n\ - return in.color;\n\ - };\n\ + fragment float4 ps(ColorInOut in [[stage_in]]) + { + return in.color; + }; "; fn main() { diff --git a/examples/shader-dylib/main.rs b/examples/shader-dylib/main.rs index b713e20e..60b6aa0d 100644 --- a/examples/shader-dylib/main.rs +++ b/examples/shader-dylib/main.rs @@ -13,7 +13,7 @@ use winit::{ use std::mem; struct App { - pub device: Device, + pub _device: Device, pub command_queue: CommandQueue, pub layer: MetalLayer, pub image_fill_cps: ComputePipelineState, @@ -98,7 +98,7 @@ impl App { .unwrap(); Self { - device, + _device: device, command_queue, layer, image_fill_cps,