Skip to content

Contract self impl #5905

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

Open
IGI-111 opened this issue Apr 23, 2024 · 2 comments · May be fixed by #7030
Open

Contract self impl #5905

IGI-111 opened this issue Apr 23, 2024 · 2 comments · May be fixed by #7030
Labels
compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen compiler: parser Everything to do with the parser good first issue Good for newcomers language feature Core language features visible to end users ODHack12 team:compiler Compiler Team

Comments

@IGI-111
Copy link
Contributor

IGI-111 commented Apr 23, 2024

Allow self impl for contracts as a shorthand for an anonymous ABI spec.
The point is to not have to write an ABI type for very small contracts.

This:

contract;
impl Contract {
    fn foo() -> u64 { 0 }
}

Should produce the same binary and ABI spec as:

contract;
abi MyAbi {
    fn foo() -> u64;
}
impl MyAbi for Contract {
    fn foo() -> u64 { 0 }
}
@IGI-111 IGI-111 added good first issue Good for newcomers language feature Core language features visible to end users compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen compiler: parser Everything to do with the parser labels Apr 23, 2024
@IGI-111 IGI-111 added the team:compiler Compiler Team label Feb 10, 2025
@krishnabandewar
Copy link

I’d love to work on this task.

@hey-ewan
Copy link

hey-ewan commented Mar 20, 2025

can I work on this? I have experience in rust and often contribute to open source projects including Hylé (a rust zk-chain) amongst a few.

@hey-ewan hey-ewan linked a pull request Mar 23, 2025 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen compiler: parser Everything to do with the parser good first issue Good for newcomers language feature Core language features visible to end users ODHack12 team:compiler Compiler Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants