Open Kerollmops opened 6 years ago
rlsl-math
is only really for experimentation atm. In the future I intent to port something like cgmath or nalgebra to rlsl.
Noticed rlsl's libstd is #![no_std]
. nalgebra now supports compiling without the standard library http://nalgebra.org/wasm_and_embedded_programming/ (if that was any concern)
@memoryruins I still support the std, it is just my own version of core and std with a lot of stuff ripped out.
I am not going to lie, porting nalgebra is to rlsl is probably very hard. I still want to try to port a subset of it in the future. I looked a bit through the source code and it looks very reasonable for a 1:1 port in a lot of cases.
I still need to figure out a good way to map types to built in SPIR-V types in a non invasive manner.
At the moment I will focus on my own math library rlsl-math, because it is much easier to develop a math library incrementally with the compiler. But it is not necessary for rlsl.
Anyone can then port their own math library to rlsl by just looking at the reference implementation rlsl-math.
Seems like the most sensible choice. First make it work well with SPIR-V types, then trait implementations (nalgebra has a “mint” trait feature flag) and crate support can come later and especially from others :)
It could probably be a great idea to implement mint Traits on most of the
rlsl
types defined in therlsl-math
crate. Many other crates implement it.