Luckily, Typst actually has experimental HTML export which is progressing quite nicely (even with MathML in the next update!), see here: https://typst.app/docs/reference/html/
It makes use of https://github.com/EnzymeAD/enzyme which is an LLVM plugin and since Rust also uses LLVM in its backend, we can enable this plugin in our Rust toolchain when autodiff is enabled. So, it is a bit of compiler black magic rather than a direct implementation in the standard library.
This is a very welcome release with all its features and as an active community member, I've seen the lengths the devs have gone to over the past few months to ensure proper internal reworkings for all of the big upcoming or planned features.
I don't always understand all of it but I trust and know that care has been taken to properly validate all of those changes, partially thanks to all the unit/integration tests we have.
It's a somewhat difficult issue and I understand being hesitant because of this. Converting to SVG is one possible path around it which isn't too bad but having it natively is of course even better.
The thing is, inserting PDF for just the PDF export would be quite easy. The issue is the other export targets Typst supports (SVG and PNG) as that would require some form of rasterization / a full blown PDF engine written in Rust without C-bindings because of the web app and that simply does not exist yet.
And the developers are hesitant to just add features for one specific export target which I get.
Ah, yeah fair enough! I was confused thinking that you were unaware of the existence of the functionality as a whole. Well, as laurmaedje (one of the main devs) said below, it should be easy to add, though it seems difficult to find which size values `big`, `bigg` and so on exactly represent.