Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide access to table exports and registering extra functions. #72

Open
basicer opened this issue Aug 28, 2024 · 1 comment
Open

Provide access to table exports and registering extra functions. #72

basicer opened this issue Aug 28, 2024 · 1 comment

Comments

@basicer
Copy link

basicer commented Aug 28, 2024

This would allow calling function that expect to be passed a c function pointer argument.

@ashtonmeuser
Copy link
Owner

This is a great next step. I'm imagining starting with supporting only exported WebAssembly tables via the following API. Please let me know your thoughts.

New class WasmTable with the following structure.

class WasmTable:
  bool import;
  func get(index: int);
  func set(index: int, func: Callable);

Tables accessible via Wasm.table(table_name).

In the future, this could support import tables via an import dictionary as follows.

imports = {
  functions: { ... },
  memory: ...,
  tables: {
    "my_table": my_table,
  },
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants