Skip to content

RowDaBoat/wgpu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wgpu

wgpu bindings for Nim

How to

  1. Install requirements: rust, git, nim
  2. Install the bindings with nimble install https://github.com/heysokam/wgpu, or add them to your project's nimble file
  3. Use import wgpu to access the wgpu bindings.

I highly recommend to follow Learn WebGPU C++ for learning the API.
It's the best newbie-friendly tutorial out there for wgpu, and it doesn't require knowing TypeScript or Rust.
As a reference, it is easier to follow than the infamous Learn OpenGL, in my opinion.

Current state and todo

  • Wrapper for wgpu-native latest
  • Rename system
    • Raw api access (for those who don't like the renames)
    • Shortened camelCase for Function names
  • Linux suppport
  • Mac support
  • Windows support
  • Web support (wasm with emscripten)
    (note: not planned. send a PR if you figure it out)

Build Info

# Requirements  (manually installed by the user)
nim   # For compiling the wrapper
rust  # For compiling wgpu-native
nglfw # For using the `wgpu/extras` features provided by the lib

Static Linking

This library is compiled automatically and linked statically when importing.

Dynamic linking is not supported in the automated builder (and not planned),
but will work if you provide support for it in your buildsystem.

Disclaimers and Other Info

About bindings generation

This wrapper is auto-generated with Futhark.
Most names are renamed with a Callback function for ergonomics.

See the @gen/cfg file for a detailed list for renaming rules.
Use the raw api @wgpu/raw for access to the verbatim C names.
Use the api @wgpu for access to the standard Nim-mified names and extras.

About the buildsystem

The buildsystem of this lib depends on cargo and git.
They will be called automatically when you build your project.

About

wgpu-native | Nim Wrapper

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •