66

In short, Amber is a programming language with Rust like syntax that compiles down to bash. More details here: https://amber-lang.com/

On the surface, it seems nice. Cleaner syntax, types, compile-time safety checks, etc. So you get to write in something nicer than bash but get the portability of bash.

My wonder is if there are pitfalls that make it worse than instead writing it in something like Python or even bash itself. I'd guess the generated bash code probably isn't the prettiest to look at or debug.

you are viewing a single comment's thread
view the rest of the comments
[-] Quibblekrust@thelemmy.club 20 points 3 days ago

It's not Rust, OP was mistaken. It's ECMA-Script-like with Rust-like features and also Python-like features.

I think the idea is, you can develop Amber scripts "at home" then deploy them on any machine that has Bash without needing to install anything. This benefits system admins.

Amber compiles directly to shell code, so you can:

  • Leverage existing shell tooling and pipelines.
  • Deploy a single script without installing a language interpreter.
  • Benefit from shell‑native features (process substitution, job control) while enjoying high‑level syntax and safety.

Is Amber production‑ready?

In the the project it is production ready because it is already used in this context because the shell code generated is tested and confirmed that works, the language is evolving with the tooling set.

Well, their FAQ isn't exactly production ready.

[-] teawrecks@sopuli.xyz 4 points 3 days ago

Unless OP edited their post, they said "Rust like", not that it is Rust.

[-] Quibblekrust@thelemmy.club 5 points 3 days ago

Yeah, it's a blurry line whether to call it rust-like if it borrows features, when actually most syntax is more like ECMA Script or Python. So I shouldn't really have said "OP was wrong". But they also kind of are. I dunno.

[-] False@lemmy.world 2 points 3 days ago

Eh, go is really good for this kind of stuff. It compiles to a single binary you can just execute from shell

[-] Quibblekrust@thelemmy.club 2 points 3 days ago

Doesn't that describe most languages?

[-] False@lemmy.world 3 points 3 days ago

I'd say no. Even C needs external libraries.

I guess Rust does this too though - in which case transpiling rust to bash is even less appealing :shrug:

[-] Quibblekrust@thelemmy.club 3 points 2 days ago* (last edited 2 days ago)

Even C needs external libraries

You can compile a C program while statically linking the libraries, thereby producing a single binary with no runtime dependencies. Just because Go can do this, too, doesn't mean it's special. It's just that most libraries for Go ship as source code and not as compiled libraries. But as soon as you import some actual library like Sqlite, OpenSSL, GTK or whatever, using some wrapper code, you're going to have the same dependency issue.

[-] CameronDev@programming.dev 2 points 3 days ago

Rust is the same mostly. One upside of bash is that if binary signing was enabled, go and rust binaries would get blocked, but bash would be fine.

this post was submitted on 26 Jul 2026
66 points (100.0% liked)

Linux

66672 readers
151 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 7 years ago
MODERATORS