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

Better syntax for external code loading #5893

Open
IGI-111 opened this issue Apr 23, 2024 · 1 comment
Open

Better syntax for external code loading #5893

IGI-111 opened this issue Apr 23, 2024 · 1 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 language feature Core language features visible to end users

Comments

@IGI-111
Copy link
Contributor

IGI-111 commented Apr 23, 2024

Instead of calling run_external:

impl MyAbi for Contract {
    extern (TargetAbi, {
        // any prelude process or checks
        // ...
        0xABCDEF // block returns target address
    }) fn foobar() -> u64;
}
@IGI-111 IGI-111 added language server LSP server 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 language feature Core language features visible to end users and removed language server LSP server labels Apr 23, 2024
@IGI-111
Copy link
Contributor Author

IGI-111 commented May 7, 2024

Importantly, the #[storage()] definition of the extern and of the called function should be able to be different (since you may access storage in the prelude but not in the target function). This should be provided for in the syntax.

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 language feature Core language features visible to end users
Projects
None yet
Development

No branches or pull requests

1 participant