Skip to content

Support fuction reflect for wasm #575

Open
@TerryGuo

Description

@TerryGuo

Hi there,

We are trying to implement function reflect for wasm target. It seems wasm has some limitations stopping us to do so. Do you guys have any thoughts on this topic? Or is this an impossible mission?

BR,
Terry

By fucntion reflect, I mean code like below:

package main

import "reflect"

func foo(x int) int {
	return x
}

func bar(f reflect.Value) {
	in := []reflect.Value{reflect.ValueOf(12345)}
	out := f.Call(in)
	println(out[0].Int())
}

func main() {
	f := reflect.ValueOf(foo)
	bar(f)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestreflectionNeeds further work on reflection

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions