A version of this shader running in VRChat can be found in this world: https://vrchat.com/home/world/wrld_8126d9ef-eba5-4d49-9867-9e3c4f0b290d
The C version was initially based on takahirox/riscv-rust (see for example instruction decoder generation using instructions.txt and parse_ins.pl), which is a great resource for learning about RISC-V in general, aside from the official specs of course.
 GPUs only really support 32-bit integer math (in the use-case I want to put this in anyway)  The elf loader ('elfy') is written in Rust, because I was too lazy to do it myself in C (Rust uses the 'elf' crate) and it doesn't need porting anyway.
This repo makes heavy use of submodules, so make sure to use git clone --recursive on initial cloning (may take a long time) and run git submodule update --recursive after a new pull.
The biggest pitfall is probably the required Perl support. The shader code uses perlpp and a valid runtime environment (I recommend Strawberry Perl for Windows). See the file AutoImport.cs for more information, you will need to set a valid path in there. Technically, the already created *.h files can be used as-is, but you won't be able to meaningfully change any code without it.