pkg
rules_python
pkg | rules_python | |
---|---|---|
91 | 7 | |
24,099 | 507 | |
- | 2.4% | |
6.3 | 9.5 | |
5 months ago | 5 days ago | |
JavaScript | Starlark | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
pkg
-
We are under DDoS attack and we do nothing
I don't remember the details, and cannot find my notes on vercel/pkg. But looking at https://github.com/vercel/pkg right now I see the project has been deprecated in favour of single-executable-applications
-
Tailwind CSS v4.0.0 Alpha
> Standalone CLI — we haven’t worked on a standalone CLI for the new engine yet, but will absolutely have it before the v4.0 release.
This part is the most exciting to me. Given the rest of the release announcement, I'm assuming this means that it'll be built in Rust rather than embed Node. While I'm not a Rust zealot of anything, I'm very partial to not embedding Node. Particularly when it depends on using Vercel's now-abandoned pkg[1] tool.`
[1] https://github.com/vercel/pkg
-
Things I've learned about building CLI tools in Python
The npm package called "pkg" seems to be the standard for packaging NodeJS applications
https://www.npmjs.com/package/pkg
Unfortunately you also need to bundle all your code into a single file for it to work, but you can use any bundler (webpack, parcel, etc) you want at least
-
Deno 1.35: A fast and convenient way to build web servers
Nodejs support for "single executable applications" is getting there - this issue below is preventing wider adoption at the moment:
"The single executable application feature currently only supports running a single embedded script using the CommonJS module system."
https://nodejs.org/api/single-executable-applications.html
Should be an awesome game changer for node.js when the feature gets rounded out.
Also check out vercel's `pkg`: https://github.com/vercel/pkg/issues/1291
-
Can I include Node inside my project?
Yes, you can. Check out pkg for a fun option, which can package up your project and Node.js into a single executable.
-
[Question] How does Node-RED compile a flow?
Further, you could experiment with the pkg tool that allows you to package up Node JS, your source, and your dependencies into one single executable for easy distribution.
- Bun v0.6.0 – Bun's new JavaScript bundler and minifier
- How to restrict the access to an on premise node server?
-
Tips for reducing Docker image size
package the app using https://github.com/vercel/pkg and use a smaller base image like alpine, busybox or even scratch (if possible)
-
Making standalone exe
Check this thread: https://github.com/vercel/pkg/issues/1685
rules_python
-
Things I've learned about building CLI tools in Python
What's SV?
I honestly don't know why anyone would use that... as in what does Bazel do better than virtually anything else that can provide this functionality. But, I used to be an ops engineer in a big company which wanted everything to be Maven, regardless of whether it does it well or not. So we built and deployed with Maven a lot of weird and unrelated stuff.
Not impossible, but not anything I'd advise anyone to do on their free time.
Specifically wrt' the link you posted, if you look here: https://github.com/bazelbuild/rules_python/blob/main/python/... it says that only pure Python wheels are supported, but that's also a lie, they don't support half of the functionality of pure Python wheels.
So, definitely not worth using, since lots of functionality is simply not there.
- Python coverage in Bazel has been broken for nearly 6 years
-
Build faster with Buck2: Our open source build system
Regarding bazel, the rules_python has a py_wheel rule that helps you creating wheels that you can upload to pypi (https://github.com/bazelbuild/rules_python/blob/52e14b78307a...).
If you want to see an approach of bazel to pypi taken a bit to the extreme you can have a look at tensorflow on GitHub to see how they do it. They don't use the above-mentioned building rule because I think their build step is quite complicated (C/C++ stuff, Vida/ROCm support, python bindings, and multiOS support all in one before you can publish to pypi).
-
Incremental Builds for Haskell with Bazel
Python support in Bazel now looks more promising with `rules_python`: https://github.com/bazelbuild/rules_python
`rules_go` to my understanding is great too.
Over years, Bazel is not as opinionated as before, mostly because adoptions in different orgs force it to be so.
-
Advantages of Monorepos
I have personally run converted build systems to Bazel, and use it for personal projects as well.
Bazel 1.0 was released in October 2019. If you were using it "a few years ago", I'm guessing you were using a pre-1.0 version. There's not some cutoff where Bazel magically got easy to use, and I still wouldn't describe it as "easy", but the problem it solves is hard to solve well, and the community support for Bazel has gotten a lot better over the past years.
https://github.com/bazelbuild/rules_python
The difficulty and complexity of using Bazel is highly variable. I've seen some projects where using Bazel is just super simple and easy, and some projects where using Bazel required a massive effort (custom toolchains and the like).
-
Experimentations on Bazel: Python & FastAPI (1)
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") #------------------------------------------------------------------------------ # Python #------------------------------------------------------------------------------ # enable python rules http_archive( name = "rules_python", url = "https://github.com/bazelbuild/rules_python/releases/download/0.2.0/rules_python-0.2.0.tar.gz", sha256 = "778197e26c5fbeb07ac2a2c5ae405b30f6cb7ad1f5510ea6fdac03bded96cc6f", )
What are some alternatives?
nexe - 🎉 create a single executable out of your node.js apps
uwsgi-nginx-flask-docker - Docker image with uWSGI and Nginx for Flask applications in Python running in a single container.
ncc - Compile a Node.js project into a single file. Supports TypeScript, binary addons, dynamic requires.
pip-upgrade - Upgrade your pip packages with one line. A fast, reliable and easy tool for upgrading all of your packages while not breaking any dependencies
reverse-engineering - List of awesome reverse engineering resources
black - The uncompromising Python code formatter
webpack - A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.
python-streams - A Library to support Writing concise functional code in python
bytenode - A minimalist bytecode compiler for Node.js
bazel-coverage-report-renderer - Haskell rules for Bazel.
oclif - CLI for generating, building, and releasing oclif CLIs. Built by Salesforce.
TypeRig - Proxy API and Font Development Toolkit for FontLab