The Wasm GC proposal unifies the externref type and anyref type (https://github.com/WebAssembly/gc/pull/271).
Right now, externref allows host values and has no subtyping relationship with other types. With the change to anyref, an anyref will allow host types, but it will also be allowed to be downcast to more specific reference types once casting operations are added. An anyref type parameter, e.g. for a function, will accept other reference types in the hierarchy as well.
(It is possible funcrefs will be excluded from the anyref hierarchy https://github.com/WebAssembly/gc/issues/293)
When Wasm GC is disabled, externref should still function as it does right now.
There is still a lot of discussion about what the role of `anyref`, `externref`, etc should be in the GC proposal: https://github.com/WebAssembly/gc/issues/307
I think until this is clear, it's best to avoid implementing `anyref` (it's unclear if a "top type" is even going to be in the final type hierarchy). It might make sense to instead implement types like `dataref` (structs & arrays) and `eqref` (dataref + i31ref) initially.
Recent discussions (in issue https://github.com/WebAssembly/gc/issues/307) and subsequent changes to the spec (https://github.com/WebAssembly/gc/pull/310) have actually undone the unification of externref and anyref types in the GC proposal.
So this issue can be closed unless the design changes again. Instead, for the GC proposal we will need to add an anyref as a new supertype of all GC datatypes.