📝 Team Buckaroo, 20/03/2019
💬 Discuss on Hacker News
This is how the NPM and Buckaroo ecosystems line-up.
|Platforms||Web, Node.js, Electron||Native, Mobile|
|Compiled Library Format||UMD, CommonJS, ES2015 module||.so, .dll, .Framework|
|Build System||Webpack, Rollup||Buck|
|Compiler||Babel||Clang, GCC, MSVC|
|Package Registry||NPM||GitHub, GitLab, BitBucket, Git|
NPM packages are stored on the NPM registry, whereas Buckaroo packages are stored directly in source-control. The reason for this is that Buckaroo packages are compiled by the consumer, whereas NPM packages are compiled by the author. This makes a binary registry unnecessary, and a security risk. You can read more about how this works in the docs.
By default, all packages in Buckaroo are public, meaning that every dependency must resolve to the same version. This is different to NPM, where packages default to being private, meaning that each dependency can have its own version. The reason for this is various tricks are required to prevent symbol collisions in C++, and often the binary layout of objects matters.
Note that Yarn will attempt to make packages share a version of a dependency. Although this is not strictly required, it makes things more likely to work.
|Initialize||npm init||buckaroo init|
|Add dependency||npm install <package>||buckaroo add <package>|
|Install dependencies||npm install||buckaroo install|
|Remove dependency||npm uninstall <package>||buckaroo remove <pacakge>|
You can read more in the docs.