Today I updated Compiler Explorer to support better sharing, specifically to allow embedding a Compiler Explorer view into another site, useful for blog posts that wish to demonstrate how compilers generate code, or how language constructs actually become assembly.
For example, maybe you want to show off how well the compiler optimizes multiplying by a constant:
To use the new functionality, click the “Share” icon and pick “Embed” from the dropdown.
The embed feature is limited to single-pane output: only a single editor and compiler are supported. The options you have selected at the time of making the link are hard-coded into the embed URL. If you have deselected “compile on type”, then the embedded link will be made non-editable (that is, the code in the embedded site will not be editable).