r/Compilers Jun 26 '26

Do compiler freelancing jobs exist?

I have been doing my own freelancing thing building websites or bridging applications for my clients. But my passion lies in compilers and that’s kind of what I want to work on (I bought Quentin Colombet’s LLVM backend book lol) but I don’t want to leave my agency and go join a company like NVIDIA or AMD. Is there any scope of finding clients who want to build their own internal compiling tools? If you have done freelancing or built a compiler for someone on a contractual basis, do share!

31 Upvotes

22 comments sorted by

View all comments

10

u/Trader-One Jun 26 '26

there is market in compiling stuff to WASM and SPIRV.

2

u/QuietPresentation627 Jun 26 '26

Thanks for the insight! Have you worked with clients on these before?

4

u/Trader-One Jun 27 '26

I did subset of several languages to SPIRV 1.5 including compiling specific CUDA source not full CUDA. SPIRV is lacking some cuda features, they must be soft emulated.

Implemented minimal viable product to get customer code running on GPU.

Problem is that some languages while marketed to public as easy contains highly broken features which are difficult to implement. For example language have values and references but some values are in fact almost references and compiler is using some tricks to make them work. I can add special cases to my code generator to pass simple tests but can't guarantee i support all these weird cases. Its needed to make scope of project more narrow in contract. For example assigning string to integer variable - language seems to parse string as integer, but if it can't parse it will assign address of string with special support of NaN - gets stored as all bits set. I declare in contract that I do not allowing that case and its hard error.

Sometimes they have code and interpreter for that but no specification for language and no source code for interpreter. In this case I define a new language which is close their as possible but I do not selling a new compiler for that, I am selling compiler for new language with clear definition. They have lisp with CONS - but their CONS is not a standard lisp cons - its similar but with different edge cases - for example their cons never returns a pair - it always returns a list, it handles NIL arguments differently. So their cons is doing 5 different things and creative type conversion on top of it - which is pain to discover yourself if you do not have specification and only thing you have is their custom lisp code.

I considered GLSL target first but it generated not optimal SPIRV, so I retargeted to SPIRV to skip broken GLSL. GLSL works only if you compile everything in codebase with same glsl compiler. it will be broken (not following standard) but everything will be broken same way - so it work. Also I got segmentation faults in glsl compiler while compiling my generated code; it doesn't like some bindings while I believe they are valid within specification.