Skip to content

Commit 42f1339

Browse files
committed
N47: posh
1 parent 656c5ca commit 42f1339

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

content/news/047/index.md

+32
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,38 @@ If needed, a section can be split into subsections with a "------" delimiter.
7575

7676
## Library Updates
7777

78+
### [posh]
79+
80+
![Example code written with posh, simplified from the hello triangle
81+
example](posh.png)
82+
83+
[`posh`][posh] is a crate that seamlessly integrates a graphics library with an
84+
embedded functional shading language. It is a proof of concept that aims to
85+
demonstrate that graphics programming can be both type-safe and ergonomic.
86+
87+
With `posh`, shaders are written in plain Rust (with some caveats). Procedural
88+
macros are only required for defining custom vertex and uniform types.
89+
90+
The core component of `posh` is the `Program<U, V, F>` type, which acts as a
91+
bridge between the shading language and the graphics library. This type
92+
represents a compiled shader and serves as the entry point for draw calls. By
93+
explicitly carrying the types `U` (uniform interface), `V` (vertex shader
94+
interface), and `F` (fragment shader interface), `posh` enables static
95+
verification, ensuring that the data provided in draw calls matches the shader's
96+
signature.
97+
98+
For simplicity, `posh` currently targets OpenGL ES 3.0. Although it is an
99+
experimental project, its authors hope to inspire the community to further
100+
explore how static typing can elegantly bridge the gap between graphics code and
101+
shader code.
102+
103+
For more details, check out the [examples][posh-examples] or the authors' [blog
104+
post][posh-blog].
105+
106+
[posh]: https://github.com/leod/posh
107+
[posh-examples]: https://github.com/leod/posh/tree/main/examples
108+
[posh-blog]: https://leod.github.io/rust/gamedev/posh/2023/06/04/posh.html
109+
78110
## Popular Workgroup Issues in Github
79111

80112
<!-- Up to 10 links to interesting issues -->

content/news/047/posh.png

338 KB
Loading

0 commit comments

Comments
 (0)