wgpu

(β˜… 173)

Pure Go WebGPU Implementation

  • .gitignore
  • .golangci.yml
  • adapter_browser.go
  • adapter_native.go
  • adapter_rust.go
  • AGENTS.md
  • arraylength_repro_test.go
  • bind_browser.go
  • bind_native.go
  • bind_rust.go
  • binder.go
  • binder_test.go
  • buffer.go
  • buffer_browser.go
  • buffer_mapping_bench_test.go
  • buffer_mapping_test.go
  • buffer_rust.go
  • CHANGELOG.md
  • cleanup_test.go
  • CODE_OF_CONDUCT.md
  • codecov.yml
  • computepass_browser.go
  • computepass_native.go
  • computepass_rust.go
  • CONTRIBUTING.md
  • copy_usage_coverage_test.go
  • coverage_device_test.go
  • coverage_encoder_test.go
  • coverage_mapping_test.go
  • coverage_pipeline_test.go
  • coverage_surface_test.go
  • coverage_wrap_test.go
  • descriptor.go
  • descriptor_browser.go
  • descriptor_rust.go
  • descriptor_test.go
  • device_browser.go
  • device_native.go
  • device_release_test.go
  • device_rust.go
  • device_test.go
  • doc.go
  • encoder_browser.go
  • encoder_native.go
  • encoder_pool.go
  • encoder_pool_test.go
  • encoder_rust.go
  • encoder_test.go
  • error.go
  • error_browser.go
  • error_rust.go
  • export_test.go
  • fence.go
  • fence_browser.go
  • fence_rust.go
  • go.mod
  • go.sum
  • gpucontext_helpers.go
  • headless_surface_native_test.go
  • indirect.go
  • indirect_count_integration_test.go
  • instance_browser.go
  • instance_lifecycle_native_test.go
  • instance_native.go
  • instance_rust.go
  • integration_test.go
  • LICENSE
  • lifecycle_test.go
  • llms.txt
  • logger.go
  • logger_browser.go
  • logger_rust.go
  • map_pending.go
  • map_pending_browser.go
  • map_pending_rust.go
  • map_types.go
  • map_types_browser.go
  • map_types_rust.go
  • mapped_range.go
  • mapped_range_browser.go
  • mapped_range_rust.go
  • mapped_range_test.go
  • mapping_test.go
  • metal_icb_benchmark_test.go
  • pending_writes.go
  • pending_writes_bench_test.go
  • pending_writes_helpers_test.go
  • pending_writes_test.go
  • pipeline_browser.go
  • pipeline_native.go
  • pipeline_rust.go
  • queue_barrier_test.go
  • queue_browser.go
  • queue_native.go
  • queue_rust.go
  • queue_test.go
  • r8sample_repro_test.go
  • README.md
  • renderpass_browser.go
  • renderpass_indirect_browser_test.go
  • renderpass_indirect_rust_test.go
  • renderpass_indirect_test.go
  • renderpass_indirect_wrappers_test.go
  • renderpass_native.go
  • renderpass_rust.go
  • resource_test.go
  • ROADMAP.md
  • sampler_browser.go
  • sampler_native.go
  • sampler_rust.go
  • SECURITY.md
  • shader_browser.go
  • shader_native.go
  • shader_rust.go
  • staging_belt.go
  • staging_belt_test.go
  • submit_validation_test.go
  • surface_backend_native_test.go
  • surface_browser.go
  • surface_native.go
  • surface_rust.go
  • surface_rust_android.go
  • surface_rust_darwin.go
  • surface_rust_linux.go
  • surface_rust_windows.go
  • surface_target.go
  • surface_target_contract_test.go
  • surface_target_hal_test.go
  • surface_target_linux_test.go
  • surface_target_native_test.go
  • surface_texture_lifetime_native_test.go
  • texture_browser.go
  • texture_copy_lifetime_test.go
  • texture_copy_scope_test.go
  • texture_native.go
  • texture_rust.go
  • types.go
  • wgpu_test.go
  • wrap.go
  • wrap_browser.go
  • wrap_rust.go
  • wrap_test.go

# Installation Guide

1. Get the code
git clone https://github.com/gogpu/wgpu

Downloads the entire project code from GitHub to your computer.

cd wgpu

Moves into the project folder you just downloaded.

2. Go

Medium Recommended
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Go The Go compiler and toolchain.
CGO_ENABLED=0 go build

Compiles the Go program into an executable.

go build -tags rust

Compiles the Go program into an executable.

GOOS=js GOARCH=wasm go build -o app.wasm .

Compiles the Go program into an executable.

βœ… If the build finishes without errors, it worked. If you used go run ., check the terminal output.

Pulled directly from this repo's README.

// repository documentation