next.js
next.js copied to clipboard
Move core node-file-trace logic into turbopack
What?
This is a prefactor for adding node-file-trace into turbopack. When implementing this, we have a few options namely:
- a) expose turbotrace (node-file-trace-rs) as a napi library and try to insert it into the current codebase
- b) expose turbotrace and try to reuse the turbo backend
- c) move turobtrace into the rust process and do it in parallel with everything else
We chose c
Why?
It is probably something we need to do anyways and since turbotrace + turbopack was not a tested branch the code bitrotted and is a bit awkward. This is about as much work and we get to skip the awkward middleground of options a, b.
How?
I tried to move some crates around but ultimately decided that the node-file-trace should exclusively be a cli entrypoint and napi lib.