bytecodealliance / bytecodealliance/ComponentizeJS

Compile components without a JS runtime

未关闭
#193 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Rust
星标
391
派生
53
平均合并
3 天 5 小时
30 天内合并 PR
1

描述

## 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!

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。