GithubHelp home page GithubHelp logo

trevor3000 / amber Goto Github PK

View Code? Open in Web Editor NEW

This project forked from amber-lang/amber

0.0 0.0 0.0 536 KB

๐Ÿ’Ž Amber the programming language compiled to bash

Home Page: https://amber-lang.com

License: GNU General Public License v3.0

Shell 4.16% Rust 95.84%

amber's Introduction

amber logo

Amber

Programming language that compiles to Bash. It's a high level programming language that makes it easy to create shell scripts. It's particularly well suited for cloud services.

Warning

This software is not ready for extended usage.

Install

Amber compiler currently works on:

  • Linux x86 and ARM
  • macOS x86 and ARM (Apple Silicon)

macOS / Linux

Make sure that the operating system meets the following prerequisites

  • Bourne-again shell (Bash)
  • Curl tool for downloading the installation script
  • Basic calculator bc command (On Debian run sudo apt install bc)
curl -s "https://raw.githubusercontent.com/Ph0enixKM/AmberNative/master/setup/install.sh" | $(echo /bin/bash)

Via a package manager

Amber is packaged in the following distros:

Arch (AUR) - amber-bash

Windows support

As windows does not come with bash installed it makes no sense to support it. Please install WSL 2 on your windows machine and install Linux version of Amber compiler inside.

In order for it to work you may need to run the following code that pulls all the prerequisites.

sudo apt install curl bc
sudo mkdir /opt /usr/local/bin

Contributing

In order to contribute, you have to add couple of build targets:

rustup target add x86_64-unknown-linux-musl
rustup target add x86_64-apple-darwin
rustup target add x86_64-pc-windows-gnu
rustup target add aarch64-apple-darwin

And linkers (macos):

brew install messense/macos-cross-toolchains/aarch64-unknown-linux-musl
brew install messense/macos-cross-toolchains/x86_64-unknown-linux-gnu

Finally in order to build

amber build.ab

Debugging Amber:

// Shows the AST
AMBER_DEBUG_PARSER=true cargo run <file.ab>
// Shows the time it took to compile each phase
AMBER_DEBUG_TIME=true cargo run <file.ab>

// Flamegraph is a profiling tool that is used to visualize the time each function took to execute
sudo cargo flamegraph -- <file.ab> <file.sh>

amber's People

Contributors

ph0enixkm avatar boushley avatar martan404 avatar mimikun avatar arapower avatar b1ek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.