Crates.io | semantics |
lib.rs | semantics |
version | 0.1.0 |
source | src |
created_at | 2022-07-07 15:01:46.051644 |
updated_at | 2022-07-07 15:01:46.051644 |
description | Semantics mapping |
homepage | https://github.com/phaazon/semantics |
repository | https://github.com/phaazon/semantics |
max_upload_size | |
id | 621223 |
size | 5,246 |
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:
Semantics allow an indirection for both systems to “speak the same language” and “represent the same data.”