Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
fac
Fac is a general-purpose build system that runs on Linux only, which automatically tracks dependencies by observing the build commands in operation. (by droundy)
-
AECforWebAssembly
A port of ArithmeticExpressionCompiler from x86 to WebAssembly, so that the programs written in the language can run in a browser. The compiler has been rewritten from JavaScript into C++.
-
rust-shed
Repository containing Rust crates common between other Facebook open source projects (like Mononoke or Eden).
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
I've so far found buck2 + reindeer to be pretty limited compared to bazel + rules_rust. rules_rust lets me give it my cargo workspace root, and it determines the dependencies needed for the whole workspace and creates a lock file with the needed data that I can check in. reindeer appears to want to generate BUCK files instead, and appears (based on how it's used in buck2 itself) to require a fake Cargo.toml that lists all of the crates.io dependencies required.
Here is some example Github Action from PyOxidizer as a Kickstarter: https://github.com/indygreg/PyOxidizer/blob/main/.github/workflows/build-exe.yml
As far as making it easy, I enjoyed using fac at one point, but it was so slow in linux containers on macos that I had to stop using it, but that discovered all of the dependencies for me, which was very cool.
My largest program to this day uses CMAKE: https://github.com/FlatAssembler/AECforWebAssembly/blob/master/CMakeLists.txt
For packages that are primarily developed in a monorepo context but also published to crates.io, a Cargo manifest can be generated from Buck targets. For example shed/async_compression/Cargo.toml is generated.
My understanding is there are differences in behavior between rustfmt and cargo fmt that a lot of people using tools like this miss and get confused about. We might also be extending this in the future to more tools.
Internally we use Pyre for Python type checking: https://github.com/facebook/pyre-check
For example here is a commit generated by rustfmt without Cargo involved: https://github.com/facebook/sapling/commit/d73aed440b7f606c610407bd2b42754749d5b9ac
Here is a commit generated by clippy fix without Cargo involved: https://github.com/facebook/hhvm/commit/efea2c4dcc12fdbf3a2e3ce383bbdca2de5f93a9
Example: https://github.com/Heeten/hello-monorepo-bazel-example
Related posts
- Py2wasm – A Python to WASM Compiler
- Finding better motivations for software work (Other than pride)
- Rust Programs Written in Rust
- I have added named function parameters to my programming language. What do you think, why do most mainstream programming languages not have it, when it is easy to implement in a compiler and it makes it easier to initialize complicated objects with many default rarely-changed parameters?
- Instagram bot (beta)