Boxroot, fast movable GC roots for a better FFI - Inria - Institut national de recherche en sciences et technologies du numérique
Communication Dans Un Congrès Année : 2022

Boxroot, fast movable GC roots for a better FFI

Résumé

We propose a new API and implementation for managing garbage collector (GC) roots for the OCaml foreign-function interface (FFI), which offers: - better performance than existing APIs (local or global roots); - efficient support for OCaml 5 with a more multicore-friendly design, with per-domain data structures; - a reasoning based on resource-management idioms, enabling an easier FFI for Rust. Our contributions include a C library called Boxroot which is already in use in several OCaml-Rust interfacing libraries. We believe that this approach generalizes beyond OCaml, to other FFI situations where a language with GC interacts with a language without pervasive GC, especially those that emphasize move semantics for resource handling (typically C++ or Rust); or even to future language explorations in mixing memory management techniques.
Fichier principal
Vignette du fichier
boxroot-mlworkshop.pdf (402.05 Ko) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-03910313 , version 1 (22-12-2022)

Identifiants

  • HAL Id : hal-03910313 , version 1

Citer

Guillaume Munch-Maccagnoni, Gabriel Scherer. Boxroot, fast movable GC roots for a better FFI. ML Family Workshop, Benoît Montagu, Sep 2022, Ljubljana, Slovenia. ⟨hal-03910313⟩
152 Consultations
98 Téléchargements

Partager

More