This is what will show up on the website, I think we need a more extensive doc here, to set up the context and also linking to the other existing docs.
Thank you for cleaning this up. Just some nits and please address the comments others already had.
I would be OK with improving documentation in a follow up, just to avoid merge conflicts and rebase.
This comment is now off.
This is not dim of cast but dim of ToMemref.
nit: variable name
nit: variable name.