Skip to content

hadronized/semantics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Semantics

The term semantics here is used to describe a value / type that strongly represents something else, tracking its type in the type-system and carrying its representation as an integer value at runtime. Semantics allow to represent something meaningful, like a user, a field, etc. by using integers underneath. The target audience is people writing protocols between two systems that are using two different namespaces.

The main motivation for this crate is luminance, which needs to be able to represent attributes (vertex attribute like a position, normal, color; fragment outputs, etc.) in two different namespaces:

  • The Rust code, where those attributes are manipulated via regular Rust variables.
  • GLSL code, which might use different names for those variables.

Semantics allow an indirection for both systems to “speak the same language” and “represent the same data.”

About

Semantics mapping between strings and integers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages