https://github.com/chances/wgpu-crystal
Bindings to wgpu-native for the Crystal programming language
https://github.com/chances/wgpu-crystal
3d-graphics compute-shaders crystal graphics graphics-library webgpu
Last synced: 8 months ago
JSON representation
Bindings to wgpu-native for the Crystal programming language
- Host: GitHub
- URL: https://github.com/chances/wgpu-crystal
- Owner: chances
- License: mit
- Created: 2019-06-05T05:56:42.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-12-18T18:58:48.000Z (over 4 years ago)
- Last Synced: 2025-04-28T15:43:55.508Z (11 months ago)
- Topics: 3d-graphics, compute-shaders, crystal, graphics, graphics-library, webgpu
- Language: Crystal
- Homepage: https://chances.github.io/wgpu-crystal
- Size: 390 KB
- Stars: 16
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# wgpu-crystal
[](https://shards.info/github/chances/wgpu-crystal)
[](https://github.com/chances/wgpu-crystal/actions/workflows/ci.yml)
[](https://github.com/chances/wgpu-crystal/blob/master/LICENSE)
Bindings to [gfx-rs/wgpu-native](https://github.com/gfx-rs/wgpu-native) for the [Crystal](https://crystal-lang.org/) programming language.
## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
wgpu:
github: chances/wgpu-crystal
```
2. Run `shards install`
## Usage
```crystal
require "wgpu"
# TODO: Write usage instructions here
```
See the [API documentation](https://chances.github.io/wgpu-crystal).
See the [wgpu-native Usage instructions](https://github.com/gfx-rs/wgpu-native#usage).
## Development
TODO: Write development instructions here
### Running examples
#### Headless
`make example-headless`
#### Headless Triangle
`make example-triangle`
#### Windowed Triangle
TODO: Add a windowed example
Ensure [glfw3](https://formulae.brew.sh/formula/glfw) is installed.
`make example-glfw-triangle`
### Alignment with `wgpu-native` Releases
Release tags' __major__ and __minor__ version numbers align with those of `wgpu-native`. For example, the `0.9.*` tags align with one of the `0.9.*` releases of `wgpu-native`. See [`./native.lock.yml`](https://github.com/chances/wgpu-crystal/blob/master/native.lock.yml#L2) for the specific native library target.
## Contributing
1. Fork it ([https://github.com/chances/wgpu-crystal/fork](https://github.com/chances/wgpu-crystal/fork))
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request
## Contributors
- [Chance Snow](https://github.com/chances) - creator and maintainer