bytecodealliance / bytecodealliance/ComponentizeJS

Compile components without a JS runtime

Ouverte
#193 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Rust
Étoiles
391
Forks
53
Merge moyen
3 j 5 h
PR mergées (30 j)
1

Description

## Summary
For certain scenarios, it would be great if we could create WebAssembly Components from JS/ESM with this library, without requiring a JS runtime.

## Background
If a backend service written in Python or Ruby would like to take an input string of Javascript, precompile a wasm component, and then run it using a Wasmtime host for Python or Ruby, needing a full JS runtime to do the compilation step will complicate things in that backend host.

## Proposal

With the current trend that a lot of JS tooling is also available in Rust (Biome, Oxc, Rolldown, etc), would it be possible to see this project as a two-layer library?

The *lower layer* is implemented in Rust (maybe using existing ecosystem tools where available) to bundle and compile the JS code into a WebAssembly Component, and the higher layer would be bindings to the lower layer.

Those *higher-layer* bindings might be JS, which would give the end result of this project (lower layer + higher level), but those bindings might also be written in Python or Ruby, to pair with e.g. [Wasmtime-Py](https://github.com/bytecodealliance/wasmtime-py) or [Wasmtime-Rb](https://github.com/bytecodealliance/wasmtime-rb).

Let me know if I should elaborate!

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Aucun fichier ni test n'est nommé. Commencez par examiner les points d'entrée de compilation JS/ESM existants ainsi que la distinction faite par la proposition entre Rust de niveau inférieur et bindings de niveau supérieur ; le travail serait considéré comme terminé lorsqu'une approche définie pour compiler sans runtime JS et identifier les bindings nécessaires serait établie.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript, rust, wasm
Domaine
compilers
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.