• 4 Posts
  • 424 Comments
Joined 4 years ago
cake
Cake day: May 31st, 2020

help-circle



    1. Cargo is truly great, but it’s a mystery to me right now how I’m going to get it to work with certain packaging systems.

    Yeah, Cargo itself doesn’t deal with any of the bundling after the executable is built.

    For that stuff, the efforts are certainly still ongoing. There’s no grand unified tool yet.

    If you just want e.g. a DEB file, then you probably want this: https://crates.io/crates/cargo-deb

    But if you want to do more in CI, then there’s kind of three popular options that I’m aware of.

    • just: More or less a shell script runner, and kind of like make.
    • cargo-make: A lot of effort has been put into this, it’s certainly got a good amount of features, but personally not a fan, since it makes you write a custom TOML format and then ideally you should be writing a custom script language, DuckScript. You can also use Rust scripts with it, which we tried, but there was just no way of passing parameters between tasks.
    • cargo-xtask: This is not a tool, it’s a pattern, basically just build your own build tool. It does have its downfalls, you’re not going to build good caching into your own build tool, for example. But in principle I find this quite workable, as you get to write your CI code in Rust. There’s also more and more community-made libraries to aid with that.




  • You might generally prefer not setting zsh as the system-wide default shell, but rather just to be launched by default in Konsole or whatever terminal emulator you’re using.
    The actual default shell will still show up in TTYs, or when you use the newgrp command, or I believe when you ssh into the machine, and probably other such edge cases, but usually, you can then just run zsh to get into zsh.
    Not setting it as the system-wide default shell just avoids any potential for problems, particularly also if some script doesn’t have a proper shebang.

    Having said that, on Debian-based distros, I usually still set the system-wide default shell to Bash (even though I use Fish), because the default dash shell is pretty much unusable.
    Not unusable enough to prevent typing “zsh”+Enter (if you don’t typo), so this is definitely optional, but yeah, it comes up often enough that dash annoys me, and I haven’t yet had compatibility problems from setting it to Bash instead.