One way to call and register functions

Aperta
#1,997 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
backend

Direzione di ricerca

Read the host and guest call entry points, the guest registration APIs, and the WIT code generation path; the issue does not name specific files or tests. Map where call, call_host, call_host_function, register_fn, and register_function are used, then check the changes in issue #1987 before scoping the API updates. Done means the proposed deprecations and removal are addressed, dynamic host calls are available, and WIT codegen uses register_fn.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

A-api

Each operation has several entry points with different costs:

  • Host calls: call, and the deprecated call_guest_function_by_name.
  • Guest calls to the host: call_host, and call_host_function, which takes an owned Vec<ParameterValue>.
  • Guest registration: #[guest_function], register_fn, and register_function with a hand-built definition.

Proposal:

  • Remove call_guest_function_by_name.
  • Add guest call_host_dynamic(name, &[ParameterValueRef], ReturnType) for runtime signatures. Deprecate call_host_function.
  • Deprecate register_function and print_output_with_host_print. Switch WIT codegen to register_fn.

Builds on #1987.

Lingua principale
Rust
Stelle
4.8k
Fork
223
Merge medio
1g 18h
PR unite (30g)
65

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di hyperlight-dev/hyperlight

Tutte le issue di hyperlight-dev/hyperlight

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.