GithubHelp home page GithubHelp logo

build-toolchain-next's People

Contributors

mmarchini avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

build-toolchain-next's Issues

Devise a migration plan for native addons

Native addons will be eventually affected by this change, therefore we need to devise a migration plan, including expected timelines and preferably migration tooling.

Initiative needs a champion

There is no champion for the strategic initiative around next-gen toolchain for Node.js. (It was @mmarchini, but she is stepping away from the project for a while.) This could use a champion. @nodejs/tsc @nodejs/build

Refs: nodejs/node#42750

Adding a tsc-agenda label to see if anyone is interested or has ideas for who might be a good person to pick it up. But it can be removed if there is discussion and no candidate emerges.

The xPack toolchains, other development tools and xpm

I don't know exactly what your requirements are, but in case this can be of any help, I'm maintaining a set of cross-platform standalone binary packages, including native toolchains (GCC and clang) and cross toolchains (arm-none-eabi, riscv-none-elf and aarch64-none-elf), plus other tools, like CMake, ninja, meson, qemu, all intended for reproducible builds.

The projects are available from:

These binary packages can be easily installed with xpm, which is an extension of npm:

For example the toolchains and other tools can be referred as dependencies by other projects and used during build, like regular builds for native components or unit tests.

Here is an example of a project using such dependencies:

If you think that anything from these projects can be of any help for node, or for any of your other projects, I'd be more than happy to contribute.

Investigate feasibility and challenges hybrid builds

Hybrid builds are builds using more than one meta build system (for example, building V8 with GN and the rest with CMake). These builds would allow us to perform any migration progressively (we could migrate one dependency at a time), and if we can build V8 with GN effectively the work needed to upgrade V8 should be greatly reduced.

Re-evaluate our approach to in-tree dependencies

Our current approach to have all dependencies in-tree is optimized for some use cases, like offline development. Since dependencies are tightly coupled to our meta build toolchain, this initiative presents an opportunity to re-evaluate how we handle dependencies. We should understand the benefits and drawbacks of the current approach compared to other approaches (like submodules or depot_tools) so we can decide if we are making the right trade-offs.

Should we bundle the toolchain to build native modules as part of Node.js?

forking discussion from #4

Today node-gyp is bundled with npm (which is bundled with Node.js), therefore we don't provide a build toolchain for native addons on our own. I wonder if as part of the node-gyp deprecation and migration to something else, we should start bundling that something else with Node.js. Building a native module is more coupled to the Node.js version than it is to the package manager, so from a design perspective it makes sense. It also ensures that deprecations and changes are properly propagated across package managers.

Just bundling would be easy, but I think we can go one step further and provide APIs that allow package managers to identify build files (so that npm install can still run the build toolchain when those are present) as well as provide APIs that abstract the necessary build parameters (defines, includes, etc) so that community can safely write their own build toolchains (not limiting folks to whatever we decide to use). Depending on how well we can write those APIs, maybe we don't even need to bundle anything (bold idea, I know).

As for what a plan would look like, I think the first step would be to move node-gyp to be bundled with Node.js instead of package managers, that'll give us more control over the deprecation moving forward.

P.S.: I haven't looked into how yarn and pnpm handle node-gyp yet (specifically, if they bundle it themselves or not).

Infrastructure plan

Changing the meta build system means we'll need to make changes to our build infrastructure (either just installing required dependencies or rethinking how we build and test nodejs/node). This issue is intended for us to discuss what options we have and to develop a plan of action.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.