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

Add WASM shim #72

Closed
k82cn opened this issue Nov 27, 2023 · 2 comments
Closed

Add WASM shim #72

k82cn opened this issue Nov 27, 2023 · 2 comments
Assignees
Labels
kind/feature New feature or request priority/p1 High priority
Milestone

Comments

@k82cn
Copy link
Contributor

k82cn commented Nov 27, 2023

wasmtime is a WASM runtime, it's easy to integrate with high performance.

@k82cn
Copy link
Contributor Author

k82cn commented Nov 27, 2023

Add service interface:

trait FlameService {
  on_service_create(ServiceContext);
  on_session_enter(SessionContext);
  on_task_invoke(TaskContext);
  on_session_leave();
  on_service_destroy();
}

Add WASM wrapper to get/set parameters of them, and the WASM should start with flame:run, for example:

struct MySvc {
};

impl FlameService for MySvc {
}

fn main() {
    let my_svc = xxx;
    ...
   flame::run(my_svc);
}

@k82cn k82cn self-assigned this Nov 27, 2023
@k82cn k82cn added kind/feature New feature or request priority/p1 High priority labels Nov 27, 2023
@k82cn k82cn added this to the 0.3 milestone Nov 27, 2023
@k82cn
Copy link
Contributor Author

k82cn commented Dec 22, 2023

fixed by #78 #77 #75

@k82cn k82cn closed this as completed Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request priority/p1 High priority
Projects
None yet
Development

No branches or pull requests

1 participant