From 37d0bc4c3499b8c544d7e1f21dc93672d8b398d1 Mon Sep 17 00:00:00 2001 From: Garrit Franke Date: Thu, 17 Dec 2020 15:27:11 +0100 Subject: [PATCH] Add backend docs --- README.md | 4 ++-- docs/SUMMARY.md | 2 ++ docs/developers/SUMMARY.md | 0 docs/developers/backends.md | 18 ++++++++++++++++++ 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 docs/developers/SUMMARY.md create mode 100644 docs/developers/backends.md diff --git a/README.md b/README.md index e09de44..c76779c 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,9 @@ It is meant to "just work", without adding unnecessary and bloated language feat ## State of this projects -Basic algorithms like the fibonacci sequence should compile fine. More sophisticated programs will not work yet. See [TODO](./TODO) for a roadmap. +Basic algorithms should compile fine. See the [examples](./examples) More sophisticated programs will not work yet. See [TODO](./TODO) for a roadmap. -The Sabre compiler emits JavaScript, until the language has matured sufficiently. Backends for WASM, C, x86 and ARM are planned. +The Sabre compiler emits JavaScript, and a C backend is currently in development. Backends for WASM, x86 and ARM are planned. ## Examples diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 103df1d..3ece72c 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -6,3 +6,5 @@ - [Common language concepts](./concepts/SUMMARY.md) - [Variables](./concepts/variables.md) - [Data Types](./concepts/datatypes.md) +- [Developer Resources](./developers/SUMMARY.md) + - [Backends](./developers/backends.md) diff --git a/docs/developers/SUMMARY.md b/docs/developers/SUMMARY.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/developers/backends.md b/docs/developers/backends.md new file mode 100644 index 0000000..e571fd7 --- /dev/null +++ b/docs/developers/backends.md @@ -0,0 +1,18 @@ +# Backends + +Sabre currently implements a JavaScript backend, but a C backend is in development. WASM, ARM and x86 are planned. +The backend can be specified in the `Cargo.toml` file in the root of the project: + +```toml +[features] +... + +default = ["backend_c"] +``` + +## Available Backends + +| Target Language | Identifier | Stability notice | +| :-------------- | :------------- | :-------------------- | +| Node.js | `backend_node` | mostly stable | +| C | `backend_c` | in active development |