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

WIP attempt to make an Export wrapper type #1842

Merged

Conversation

MarkMcCaskey
Copy link
Contributor

Based on feedback on that PR, creating a wrapper type for ExportFunction: in order to make it more clear which is which, I also made an EngineExport and followed the code to where that needed to live... it seems that we'll just end up replacing all uses of Export with EngineExport in the API and that seemed wrong, looking for feedback here.

I can't figure out how we can ever use the non-wrapped type though
lib/vm/src/instance.rs Outdated Show resolved Hide resolved
lib/vm/src/export.rs Outdated Show resolved Hide resolved
lib/vm/src/export.rs Outdated Show resolved Hide resolved
@Hywan
Copy link
Contributor

Hywan commented Nov 26, 2020

This PR will break as soon as #1837 is merged :-).

@syrusakbary
Copy link
Member

syrusakbary commented Nov 30, 2020

Next steps:

  1. VM Export names: Export, FunctionExport, ... should be renamed to VMExport, VMFunctionExport, ...
  2. Engine Export names: EngineExport should be renames to Export ...
  3. Wrap all VMXXXExport into XXXExport in the Engine, with wrapper types.
struct FunctionExport {
  vm_function: VMFunctionExport
  ptr_...: 
}

struct MemoryExport {
  vm_memory: VMMemoryExport
}
...

@MarkMcCaskey
Copy link
Contributor Author

bors try

bors bot added a commit that referenced this pull request Nov 30, 2020
Copy link
Member

@syrusakbary syrusakbary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, thanks for the changes!

@bors
Copy link
Contributor

bors bot commented Nov 30, 2020

@MarkMcCaskey MarkMcCaskey merged commit d0c44c6 into feature/host-env-prototype Nov 30, 2020
@bors bors bot deleted the host-env-prototype-export-change branch November 30, 2020 23:41
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

Successfully merging this pull request may close these issues.

3 participants