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

Spec: XCQ executor API #12

Open
xlc opened this issue Apr 29, 2024 · 0 comments
Open

Spec: XCQ executor API #12

xlc opened this issue Apr 29, 2024 · 0 comments

Comments

@xlc
Copy link
Member

xlc commented Apr 29, 2024

Define the interface for XCQ executor to communicate with XCQ program

#[polkavm_derive::polkavm_import]
extern "C" {
    fn query(id: ExtendionId, method: u8, args: &[u8]) -> Vec<u8>;
}

#[polkavm_derive::polkavm_export]
extern "C" fn extensions() -> Vec<ExtensionId> {
	// return the extensions list
}

#[polkavm_derive::polkavm_export]
extern "C" fn execute(args: &[u8]) -> Vec<u8> {
	// The program body
}
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

1 participant