Skip to content

Add bun to ethereumjs #3144

Open
Open
@roninjin10

Description

@roninjin10

Bun is a drop in JavaScript replacement that may be able to greatly improve the performance of ethereumjs. The downside is it is much less stable than Node. This is somewhat mitigated by the Bun team being relatively fast to fix bugs when given a minimal reproducable example.

Caveats

I do not recomend using bun for the package manager. I use Bun myself in evmts and though it works i have ran into a lot of issues related to using Bun install in a monorepo. It's not too bad but I would generally recomend this repo sticks with npm (or pnpm) for now.

I do not recomend using bun as test runner over vitest. It's useful as a test runner for simple packages but vitest is much more feature complete. You can however speed up vitest via running it with bun.

Example using bun

My EVMts currently is using the EVM package from ethereumjs and it is working great:
image

Tasks

These are the tasks I could do to contribute this feature in order:

  • Add example usage of running ethereumjs with bun
  • Add benchmark comparisons
  • Add bun to root level package.json and migrate some of the developer scripts to use bun as runtime
  • Add to CI. Run tests in a matrix vs both node and bun

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions