That is half of what I would need for a project, the other half being Clang itself running in the browser (to use for teaching). In theory there is [1] since many years, but in practice it never worked for me (even now I get "Runtime error: memory access out of bounds"). [1] https://tbfleming.github.io/cib/
Do you know https://webassembly-studio.kamenokosoft.com/ ? I don't know if it compiles in the browser or on a server.
Show HN: How to compile C/C++ for WASM, pure Clang, no libs, no framework
11–20 of 44 posts
Re: Show HN: How to compile C/C++ for WASM, pure Clang, no libs, no framework
#12Re: Show HN: How to compile C/C++ for WASM, pure Clang, no libs, no framework
#13This looks good! In my experience the hardest part for compiling WebAssembly is third party dependencies. Getting arbitrary libraries to build can be rather challenging.
Re: Show HN: How to compile C/C++ for WASM, pure Clang, no libs, no framework
#14We did a similar thing running Clang on the browser, which is now uploaded to WAPM: https://wapm.io/syrusakbary/clang
Re: Show HN: How to compile C/C++ for WASM, pure Clang, no libs, no framework
#15This is really awesome, good work! We did a similar thing running Clang on the browser, which is now uploaded to WAPM: https://wapm.io/syrusakbary/clang
Re: Show HN: How to compile C/C++ for WASM, pure Clang, no libs, no framework
#16Earlier quoted context omitted.
Do you know https://webassembly-studio.kamenokosoft.com/ ? I don't know if it compiles in the browser or on a server.
That's fast! But it looks like it still needs a server, and I'd rather avoid giving the internet arbitrary code execution rights to some server I pay for and risk having my bill explode or my account terminated for abuse.
Re: Show HN: How to compile C/C++ for WASM, pure Clang, no libs, no framework
#17Earlier quoted context omitted.
That's fast! But it looks like it still needs a server, and I'd rather avoid giving the internet arbitrary code execution rights to some server I pay for and risk having my bill explode or my account terminated for abuse.
Choose a supplier with a 100Mbit limit and unlimited bandwidth.
Re: Show HN: How to compile C/C++ for WASM, pure Clang, no libs, no framework
#18However...
inc.cpp:27
Gray is not the average of RGB, it is usally approximated with `Y = 0.299 R + 0.587 G + 0.114 B`.
Re: Show HN: How to compile C/C++ for WASM, pure Clang, no libs, no framework
#19directly when reading this code I cannot help myself but to get into review-mode. It is an awesome example, which i will probably use myself one day. However... inc.cpp:27 Gray is not the average of RGB, it is usally approximated with `Y = 0.299 R + 0.587 G + 0.114 B`.