feat: Add support for Vyper in the Playground

未关闭
#407 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
python, typescript, wasm

调研方向

首先阅读现有的 Playground 组件,并追踪当前的 soljson.js 工作流。根据 Vyper 声明的依赖项和浏览器限制,对比 Pyodide、Brython 和 Skulpt。完成的标准是选定一种集成方案、添加 Vyper 语言路径、在客户端编译源代码,并将字节码传入现有的 EVM 模拟器。

由索引模型根据 Issue 内容生成。

描述

Description

Currently, evm.codes is the gold standard for interactive EVM opcode debugging, but it is primarily focused on Solidity and Yul. As Vyper remains a critical language for Ethereum (powering protocols like Curve and others), adding Vyper support would make this tool the ultimate cross-language playground for the ecosystem.

The Challenge: Python in the Browser

Since Vyper is a Python-based application with specific dependencies, running it in a browser environment requires a way to execute Python code without a backend. I have been researching ways to achieve this and would like to propose an implementation strategy.

Proposed Technical Approaches

To run the Vyper compiler client-side, we could utilize one of the following:

Pyodide (WASM): (Recommended) A WASM-based CPython interpreter. It is robust, handles complex dependencies well, and can be isolated in a Web Worker to prevent UI blocking.
Brython: Transpiles Python to JS at runtime.
Skulpt: A pure JavaScript implementation of a Python interpreter.

Given that Vyper relies on specific libraries (like ast and semantic-version), Pyodide seems the most viable for a high-fidelity compilation experience similar to the existing soljson.js workflow.

I would like to implement this!

I am highly interested in carrying out this work. My goal is to create a seamless experience where switching the language dropdown to "Vyper" initializes a Vyper-specific worker, compiles the source to bytecode, and feeds it directly into the existing EVM emulator.

I’ve been exploring the site's architecture and would appreciate any guidance on the preferred way to integrate this into the existing Playground component.

主要语言
TypeScript
星标
833
派生
197
平均合并
5 分钟
30 天内合并 PR
2

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

duneanalytics/evm.codes 的其他 Issue

查看 duneanalytics/evm.codes 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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