How does LLVM exactly work with WebAssembly's externref and funcref types?
-
I'm a D developer who recently got into the whole WASM thing with it using betterC (I do plan to write my own very minimalistic runtime to allow me using classes yet again), and currently I'm looking into enhancing the language's support of WASM in one way or another, especially when it comes to two "exotic" types of WASM,
externref
andfuncref
(there's alsoexnref
, but it's just before finalization, so I'm waiting a bit with that one).Me and others also programming in D have experimented with LDC (D compiler with LLVM backend) attributes since those types supposed to be address space 10 and 20 pointers, but I don't know whether the issue is that LDC doesn't handle type/pointer attributes the way we expected it to thus ending up generating
i32
instead, or that I specifically need to emit the types for the LLVM backend. -
-
[email protected]replied to [email protected] last edited by
So far it seems the issue could be solved by LDC's magic attribute/pragma system, except it isn't hooked up to the address space system.