Skip to content

Commit

Permalink
feat(readme): removed stuff and added link to the doc website (#502)
Browse files Browse the repository at this point in the history
* feat(readme): removed stuff and added link to the doc website

* Update CONTRIBUTING.md

* feat(review): removed contributing

* Update README.md

Co-authored-by: Phoenix Himself <[email protected]>

* Update README.md

Co-authored-by: Phoenix Himself <[email protected]>

---------

Co-authored-by: Phoenix Himself <[email protected]>
  • Loading branch information
Mte90 and Ph0enixKM authored Oct 15, 2024
1 parent cd0338a commit 71c8902
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 339 deletions.
268 changes: 0 additions & 268 deletions CONTRIBUTING.md

This file was deleted.

73 changes: 2 additions & 71 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,78 +15,9 @@ If [shfmt](https://github.com/mvdan/sh) it is present in the machine it will be
[Join our Matrix room](https://matrix.to/#/#_oftc_#amber-lang:matrix.org)

## Install
Amber compiler currently works on:
- Linux x86 and ARM
- macOS x86 and ARM (Apple Silicon)
- Nix (NixOS)

### 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`)

#### system-wide install
```bash
bash <(curl -s "https://raw.githubusercontent.com/amber-lang/amber/master/setup/install.sh")
```

#### local-user install
```bash
bash -- --user <(curl -s "https://raw.githubusercontent.com/amber-lang/amber/master/setup/install.sh")
```

#### Via a package manager
[![Packaging status](https://repology.org/badge/vertical-allrepos/amber-lang.svg)](https://repology.org/project/amber-lang/versions)

### 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.

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

You can find an installation guide on the [documentation website](https://docs.amber-lang.com/getting_started/installation).

## Contributing
In order to contribute, you have to add couple of build targets:
```bash
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):
```bash
brew install messense/macos-cross-toolchains/aarch64-unknown-linux-musl
brew install messense/macos-cross-toolchains/x86_64-unknown-linux-gnu
```

Compile it:
```
git clone https://github.com/Ph0enixKM/Amber
cd Amber
cargo build
```

In order to build the installer scripts run:
```bash
amber build.ab
```

Debugging Amber:
```bash
// 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>
```

## Github Actions
We are using `cargo-dist` to build the binaries for all the platforms. The binaries are then uploaded to the release page once a new release a tag is created.
Contributing guide can be found on the [documentation website](https://docs.amber-lang.com/contribute/contribute).

0 comments on commit 71c8902

Please sign in to comment.