How do I get Started with V8 Development?
Have you never taken a compiler course (maybe no formal CS course) or no experience in C++? Fear not, nobody was born with that knowledge. You don’t need to understand all aspects of compilers to make a contribution. Here are some resources that might help you on the way.
There are multiple blogs about V8:
- Official V8 blog v8project.blogspot.com
- benediktmeurer.de (V8 compiler and benchmarks)
- http://ripsawridge.github.io/ (V8 compiler)
- https://medium.com/@tverwaes (V8 runtime)
- http://mrale.ph/ (Not on the V8 team anymore.)
If you rather listen than read, you might want to watch these videos:
- Breaking the Speed Limit from 2012 by Daniel Clifford, V8 lead [Slides]
- A Trip to the Zoo from 2015 by me, Nordic.js [Slides]
- A little on V8 and WebAssembly from 2016 by Ben Titzer [Slides]
- JS Engines — how do they even? from 2017 by me, JSConfEU [Slides]
Unfortunately, there’s a huge gap between these high level resources and the actual 948341 lines of source code in
V8/src. But you learn by doing. So get the source code and build it. See if you can run the tests. V8 has millions of lines of code in
V8/test. Stick to running a few tests locally, or you’ll wait for several hours. Follow the V8 Wiki for building and running V8. The wiki also has instructions on how to commit a change list. A change list is the Chromium terminology for a pull request.
It takes a while to compile V8.
Who needs a heater when you can compile V8 on your laptop?— Franziska Hinkelmann, Ph.D. (@fhinkel) November 13, 2016
To run your local modified V8 instead of the released version in the browser, use D8, V8’s debug shell. When you work with V8, you can use
git just like you’re used to from other projects.
Once you get to the point where you can edit error messages and see the change in D8, upload your code and run all the tests on the V8 testing infrastructure. You should see some tests fail because we have tests that check the wording of error messages. This gets you familiar with our code review tool and how to run automated tests on our infrastructure, so you’re ready when you want to submit a patch. Details on how to use the V8 (Chromium) review tool and how to run the tests are here.
Making substantial changes in V8 is hard and requires a lot of time and knowledge. I would be lying if I told you that you can easily change how V8 works or add new features. But everybody has to start somewhere. Maybe you’ll stick with it and we see a change list from you in the future.
Have fun and enjoy learning!