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

Explore ways to support contract extensibility #1326

Open
leighmcculloch opened this issue Aug 21, 2024 · 2 comments
Open

Explore ways to support contract extensibility #1326

leighmcculloch opened this issue Aug 21, 2024 · 2 comments

Comments

@leighmcculloch
Copy link
Member

We could explore ways to support extending an existing contract with new functionality.

A couple times people have asked for the ability to take an existing contract, or a template, and extend the contract with custom functionality.

Solidity supports this through inheritance.

@leighmcculloch
Copy link
Member Author

leighmcculloch commented Aug 21, 2024

Rust does not support inheritance, and the structure of the existing contract macros make it difficult to generate a contract from a partial representation extending a trait.

@leighmcculloch
Copy link
Member Author

The main challenge of supporting extensibility is similar to the main challenge to support type reusability:

Both issues require coming up with a way to selectively export information (types, functions) that is defined in other crates. This is not trivial because the export information is generated as compile type into static variables that rustc destines for custom sections in the wasm.

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
@leighmcculloch and others