cargo-zigbuild
terminal-typeracer
Our great sponsors
cargo-zigbuild | terminal-typeracer | |
---|---|---|
19 | 8 | |
1,167 | - | |
4.7% | - | |
8.6 | - | |
12 days ago | - | |
Rust | ||
MIT License | - |
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.
cargo-zigbuild
-
Show HN: macOS-cross-compiler – Compile binaries for macOS on Linux
https://github.com/rust-cross/cargo-zigbuild
I’m curious what the blockers are for rustc to cross-compile like zig does natively.
- [Review] Introducing cargo-xwin: A Solution for Cross-Compiling Rust on macOS to MSVC
- Compiling Linux to Mac in CI/CD
-
Conditional compilation to avoid cross compilation
Perhaps you can try cargo-zigbuild, it uses zig-cc for cross-compilation instead of creating a container, so it should be much more lightweight on MacOS, without all the cost of virtualization and file sharing.
- Cross-compiling simple Rust code from Mac OS X to Raspberry Pi 4
-
Future of Rust, 2023 and beyond?
I have tried, however I haven't been able to get it to work reliably (e.g. building on windows + linux on WSL works, Mac is a lot more involved; tried building for windows + linux on Mac and I couldn't get it to work at all); I've had some luck using zigbuild but that too doesn't seem to work for Mac.
-
C2Rust Transpiler
Zig also takes this approach, and even exposes its C compiler (which if I recall correctly is basically Clang plus diverse sysroots and other customisation out of the box) as a separate `zig cc`.
I do a lot of work in Rust, and cross-compilation can be a pain when you have a lot of C dependencies. Fortunately https://github.com/messense/cargo-zigbuild exists. It sounds crazy, but using Zig's inbuilt C compiler to help build my Rust projects has been the smoothest option I've found.
I can't help but wonder if it would be worth it for Rust to follow D and Zig by shipping its own inbuilt C compiler, even if they still want to also support external C toolchains. It should be roughly the same effort as it was for Zig, given that they both use LLVM.
-
Short story of Rust being amazing yet again (because it compiles on different architectures effortlessly)
Wait until you start using cargo zig-build. Suddenly it becomes way better than Go's cross compiler because you can seamlessly cross-compile rust AND C (thanks to Zig compiler of course). https://github.com/messense/cargo-zigbuild
- The perfect language
-
Cross-compilation in Rust
I've personally used cargo-zigbuild and cargo-xwin to distribute a GUI app built with iced.
terminal-typeracer
-
Short story of Rust being amazing yet again (because it compiles on different architectures effortlessly)
I generate for a number of different platforms here: https://gitlab.com/ttyperacer/terminal-typeracer/-/blob/master/build-all.sh and that includes a number of C dependencies (openssh, libgit, sqlite).
-
I made toipe: a terminal based typing test written in Rust
For more info on the config options and docs, you can see here: https://gitlab.com/ttyperacer/terminal-typeracer/-/blob/v2.0.13/docs/config.md
If there are ever any features you'd like me to add, feel free to make an issue.
Nice! Reminds me of terminal-typeracer, also written in Rust and available in the AUR.
-
The M1 Mac is phenomenal (programmer's perspective)
I decided to do a little Docker to see how the experience was. I updated one of my projects to add an x86 Linux cross compile. Nothing too exciting: https://gitlab.com/ttyperacer/terminal-typeracer/-/blob/master/build-all.sh
-
ttyper - a typing test in the terminal written in Rust
Not trying to diminish your work since this is very cool, but it's almost exactly like https://gitlab.com/ttyperacer/terminal-typeracer
What are some alternatives?
ttyper - Terminal-based typing test.
zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
smassh - Smassh your Keyboard, TUI Edition
toipe - yet another typing test, but crab flavoured
aws-lambda-rust-runtime - A Rust runtime for AWS Lambda
rust.aws-cdk-lambda - A CDK (v2) Construct Library for AWS Lambda in Rust
code-server - Non-root Docker image running Debian and code-server.
crossterm - Cross platform terminal library rust
gping - Ping, but with a graph
multipass - Multipass orchestrates virtual Ubuntu instances
serverless-rust-demo - Sample serverless application written in Rust
wally - The Flash(ing tool)