Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heysokam/wgpu
wgpu-native | Nim Wrapper
https://github.com/heysokam/wgpu
Last synced: 8 days ago
JSON representation
wgpu-native | Nim Wrapper
- Host: GitHub
- URL: https://github.com/heysokam/wgpu
- Owner: heysokam
- License: lgpl-3.0
- Created: 2023-04-19T16:10:19.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-04-29T10:36:23.000Z (7 months ago)
- Last Synced: 2024-04-30T08:50:23.497Z (7 months ago)
- Language: Nim
- Homepage:
- Size: 618 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
![wgpu](./doc/res/gh_banner.png)
# 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++](https://eliemichel.github.io/LearnWebGPU/) 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
- [x] Wrapper for wgpu-native latest
- [ ] Better rename system
- [ ] `camelCase` for Function names
- [ ] Redundant type prefixes in function names
- [ ] Linux suppport
- [ ] Windows support
- [ ] Mac support
- [ ] Web support (wasm with emscripten)
_(note: not planned. send a PR if you figure it out)_## Build Info
```md
# 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 will not be implemented._## 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](./gen/cfg.nim) file for a detailed list for renaming rules.### About the buildsystem
The buildsystem of this lib depends on cargo and git.
They will be called automatically when you build your project.