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

Turn ewasm_api into a trait #5

Open
axic opened this issue Aug 11, 2018 · 4 comments · May be fixed by #29
Open

Turn ewasm_api into a trait #5

axic opened this issue Aug 11, 2018 · 4 comments · May be fixed by #29

Comments

@axic
Copy link
Member

axic commented Aug 11, 2018

And provide two implementations:

  • native
  • scaffolded (* maybe look for a better name)

The native one wraps around the C functions, while the scaffolded can be used for testing.

@jakelang
Copy link
Member

@axic I think that EEI as a trait doesn't make sense. I would bottle it up into a module so that it can still be isolated in its own namespace, but since it isn't an interface for a type it shouldn't be a trait.

As a module, EEI methods can be called like ewasm_rust_api::eei::function(args) without being associated to a type.

@axic
Copy link
Member Author

axic commented Aug 11, 2018

Whatever is the right Rust term, it would make sense to have the ability to swap out the underlying implementation with preloaded data to enable proper in-Rust testing of the precompiles/runevm.

@jakelang
Copy link
Member

jakelang commented Sep 1, 2018

@axic I want #6 to be merged before this is implemented, to avoid nasty diffs and merge conflicts.

@axic axic added this to To do in Public testnet (3rd milestone) via automation Nov 29, 2018
@axic axic added this to To do in Precompiles - Milestone 3 via automation Nov 29, 2018
@axic
Copy link
Member Author

axic commented Nov 29, 2018

Here's some initial work from August: https://github.com/ewasm/ewasm-rust-api/tree/turn-into-trait

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
Development

Successfully merging a pull request may close this issue.

2 participants