40

Rust to SPIR-V compiler

 4 years ago
source link: https://www.tuicool.com/articles/zMBRnmv
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Rlsl - Rust Like Shading Language

The project is currently unusable

What is Rlsl?

Rlsl can compile a subset of Rust to SPIR-V . You can read more about the limitations here .

Rlsl targets the logical addressing model of SPIR-V.

The Logical addressing model means pointers are abstract, having no physical size or numeric value. In this mode, pointers can only be created from existing objects, and they cannot be stored into an object, unless additional capabilities, e.g., VariablePointers, are declared to add such functionality.

Features

  • Supports cargo
  • Multiple entry points can be defined in the same SPIR-V module
  • Currently supports Vertex, Fragment and Compute shaders
  • Shader code can run on the CPU because rlsl is a subset of Rust
  • Reflection TODO
  • Support library for interop between Rust and rlsl for uniforms (std140, std420) TODO

Installation

TODO

How?

RUSTC=rlsl cargo build

bUJVzmM.gif

Blog

  1. What is RLSL
  2. Milestone 1

Want to help?

Contribute

The project currently does not accept any contributions yet.

  • Rlsl can not be easily built by anyone
  • There is no documentation
  • Debugging tools are almost non existent
  • There is no infrastructure for testing
  • No guide level explanation for contributions

Rlsl will start to accept contributions after those issues are properly addressed.

Donate

73QFVr7.png!web

Community

Want to chat? Join us on gitter .

Feel free to open an issue at any time.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK