The text explainer for resource types says the following:
resourcetype ::= (resource (rep i32) (dtor <funcidx>)?)
And the binary explainer says the following:
resourcetype ::= 0x3f 0x7f f?:<funcidx>? => (resource (rep i32) (dtor f)?)
A signature of i32 => [] implies that the destructor should be a core func, not a component func. If so, I would expect both grammars to use core:funcidx, which is what you see for e.g. realloc: (realloc <core:funcidx>), 0x04 f:<core:funcidx> => (realloc f).
That said, I am then further confused because the realloc examples in the explainer all use (realloc (func $libc "realloc")). I assume this is an inlinealias, but is there really no distinction between a func and core func when performing an inline alias? If I understand correctly, an explicit alias would look like (alias core export $libc "realloc" (core func)), while the implicit alias apparently is (func $libc "realloc"). I don't understand this inconsistency.
Regardless of (func vs. (core func in the text format, though, should the formal grammars for resourcetype indeed be changed to core:funcidx?
The text explainer for resource types says the following:
And the binary explainer says the following:
A signature of
i32 => []implies that the destructor should be a core func, not a component func. If so, I would expect both grammars to usecore:funcidx, which is what you see for e.g. realloc:(realloc <core:funcidx>),0x04 f:<core:funcidx> => (realloc f).That said, I am then further confused because the
reallocexamples in the explainer all use(realloc (func $libc "realloc")). I assume this is aninlinealias, but is there really no distinction between afuncandcore funcwhen performing an inline alias? If I understand correctly, an explicit alias would look like(alias core export $libc "realloc" (core func)), while the implicit alias apparently is(func $libc "realloc"). I don't understand this inconsistency.Regardless of
(funcvs.(core funcin the text format, though, should the formal grammars forresourcetypeindeed be changed tocore:funcidx?