Skip to content

Commit 5678ac6

Browse files
committed
docs: move and adapt the other chapters of Stan's docs suitable for public docs
also added `just serve-docs`
1 parent 324097b commit 5678ac6

File tree

24 files changed

+294
-56
lines changed

24 files changed

+294
-56
lines changed

docs/experimental-documentation/Introduction/Backends/CoreBackend.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,32 @@
1-
The Core backend is used for systems programming languages, like:
1+
## RR backend
2+
3+
The RR backend is used for systems programming languages, like:
24

35
1. [C & C++](https://dev-docs.codetracer.com/Introduction/Backends/CoreBackend/CAndCpp)
46
1. [Goland](https://dev-docs.codetracer.com/Introduction/Backends/CoreBackend/Golang)
57
1. [Nim](https://dev-docs.codetracer.com/Introduction/Backends/CoreBackend/Nim)
68
1. [Rust](https://dev-docs.codetracer.com/Introduction/Bacends/CoreBackend/Rust)
79

8-
Under the hood, it uses a patched version of the [rr debugger](https://rr-project.org/), as well as the standard
10+
Under the hood, it uses a patched version of the [RR debugger](https://rr-project.org/), as well as the standard
911
GDB debugger.
1012

13+
We are still not distributing it, but we might need to rethink the GDB usage before that.
14+
1115
The Core backend is based on a dispatcher that maintains a pool of rr replay processes. These processes allow you to jump back and forward in time, while also
1216
preloading information, such as the information, needed for omniscience and calltrace, as well as managing other features, such as tracepoints. This logic is
13-
implemented using python code using the gdb API.
17+
currently implemented using python code using the gdb API.
18+
(If required, this can be changed to use the lldb API or something more custom, like a dwarf lib-based solution. We are currently using the rust `gimli` DWARF lib for a tool, that helps with recording/metadata in the RR backend).
19+
20+
These are the main differences, when compared to the DB Backend: based on the way RR works:
1421

15-
These are the main differences, when compared to the DB Backend:
22+
1. Only non-deterministic events are recorded.
23+
1. The program's different states are navigated through re-execution.
24+
1. More practical for recording real-world software(RR was originally created by Mozilla to debug Firefox)
25+
1. Some features of CodeTracer are more challenging to implement, compared to the [DB Backend](./backends/db-backend.md)
1626

17-
1. Only non-deterministic events are recorded
18-
1. The program's different sates are navigated through re-execution
19-
1. Practical for recording real-world software(rr was originally created by Mozilla to debug Firefox)
20-
1. Some features of CodeTracer are more challenging to implement, compared to the [DB Backend](https://dev-docs.codetracer.com/Introduciton/Backends/DBBackend)
27+
> ![NOTE]
28+
> This backend is in active development, and is yet to be released to the wider public.
29+
>
30+
> It is currently proprietary and it might remain closed source.
31+
> Open sourcing it is also possible, if we find a suitable business model.
2132
22-
This backend is in active development, and is yet to be released to the wider public.
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
The DB backend is used for interpreted languages, like:
1+
The DB backend can be used for interpreted languages, like:
22

3-
1. [Noir](https://dev-docs.codetracer.com/Introduction/Backends/DBBackend/Noir)
4-
1. [Ruby](https://dev-docs.codetracer.com/Introduction/Backends/DBBackend/Ruby)
5-
1. [Lua](https://dev-docs.codetracer.com/Introduction/Backends/DBBackend/Lua)
6-
1. [SmallLang](https://dev-docs.codetracer.com/Introduction/Backends/DBBackend/SmallLang)
3+
1. [Noir](./backends/db_backend/noir.md)
4+
1. [Ruby](./backends/db_backend/ruby.md)
5+
1. [Python(prototype not finished yet)](./backends/db_backend/python.md)
6+
1. [Lua(not done: just a plan)](./backends/db_backend/lua.md)
7+
1. [small(a toy interpreter for dogfooding)](./backends/db_backend/small.md)
78

89
As the name suggests, this backend is implemented as a large database. Due to its properties, this backend provides
910
a more complete feature set - one of the reasons it was open-sourced first.

docs/experimental-documentation/Introduction/Troubleshooting.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@ If you find any bug, please report it as an issue on GitHub.
44
In the meantime, you can use this page to fix some issues that are somewhat common.
55

66
## Fixing outdated configuration/layout files
7+
78
You can find more information [here](https://dev-docs.codetracer.com/Introduction/Configuration#Layout).
89

910
## Resetting the local trace database
11+
1012
There are 2 commands that can be used to completely wipe all traces from your user's data:
1113

1214
1. `just reset-db` - Resets the local user's trace database
1315
1. `just clear-local-traces` - Clears the local user's traces
1416

1517
## Broken local build
18+
1619
Sometimes your local build might break. In most cases, a simple `direnv reload` and `just build` should be able to fix it.
1720
Otherwise, you can ask for help on our [issues tracker](github.com/metacraft-labs/codetracer), or in our [chat server](https://discord.gg/aH5WTMnKHT)
1821

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Building the documentation
2+
23
The documenation for codetracer is written in [GitHub Flavoured Markdown](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)
34
that's converted to HTML using [pandoc](https://pandoc.org). This makes the documentation both easy to write, maintain, deploy and build.
45

56
To build the documentation run `just build-docs`. If you want to build the documentation for local development, run `just build-docs localhost` and a web server will be started on port `5000`.
67

7-
The built is stored under `docs/experimental-documentation/build`, while the markdown files are under `docs/experimental-documentation` and its child directories.
8+
The built doc files are stored under `docs/experimental-documentation/build`, while the markdown files are under `docs/experimental-documentation` and its child directories.
Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,35 @@
1-
# Summary
1+
## Summary
22

3-
- [Introduction](./chapter_1.md)
3+
- [Introduction](./introduction.md)
44

5-
# Usage guide
5+
## Usage guide
66

77
- [Intro to usage guide](./usage_guide/intro_to_usage.md)
88
- [CLI](./usage_guide/CLI.md)
99
- [Basic GUI](./usage_guide/basic_gui.md)
1010
- [Tracepoints](./usage_guide/tracepoints.md)
1111
- [CodeTracer Shell](./usage_guide/codetracer_shell.md)
1212

13+
## Backends
14+
15+
- [DB backend](./backends/db_backend.md)
16+
- [Noir](./backends/db-backend/noir.md)
17+
- [Ruby](./backends/db-backend/ruby.md)
18+
- [Python](./backends/db-backend/py.md)
19+
- [Lua](./backends/db-backend/lua.md)
20+
- [small](./backends/db-backend/small.md)
21+
22+
- [RR backend](./backends/rr_backend.md)
23+
- [C & C++](./backends/rr-backend/c_and_cpp.md)
24+
- [Rust](./backends/rr-backend/rust.md)
25+
- [Nim](./backends/rr-backend/nim.md)
26+
- [Go](./backends/rr-backend/go.md)
27+
28+
## Building & packaging
29+
30+
- [Build systems](./building_and_packaging/build_systems.md)
31+
32+
### Misc
33+
34+
- [Troubleshooting](./misc/troubleshooting.md)
35+
- [Building the documentation](./misc/building_docs.md)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Lua
2+
3+
We still don't have Lua support, however we've had a very minimal proof of concept experiment with supporting Lua (the interpreter, not LuaJIT) with our RR backend years ago.
4+
5+
We can change that patch to produce traces suitable for the DB backend, or at least publish some kind of basis for that(the RR approach remains possible, but with different tradeoffs)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Noir
2+
3+
The initial release of CodeTracer has MVP support for the Noir programming language. It has been developed in collaboration with the Blocksense team and currently requires the use of the [Blocksense Noir Compiler](https://github.com/blocksense-network/noir), which is included in the CodeTracer distribution.
4+
5+
We support many of Noir's features, but not all: e.g. we don't support mutable references currently, we don't serialize struct values and some other cases.
6+
7+
We are planning on adding support for the missing features.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## python
2+
3+
We currently have started adding support for recording python programs for the DB backend, but the prototype isn't finished yet.
4+
5+
The recorder is currently hosted in the [codetracer-python-recorder](https://github.com/metacraft-labs/codetracer-python-recorder) repo.
6+
7+
You can read its README for more details. We are welcoming contributors!
8+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Python
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Ruby
2+
3+
We currently have partial support for the Ruby programming language in the DB backend.
4+
We support many cases, you can use it like `ct record <path to rb file> [<args>]` and `ct replay <name of rb file>` (or directly `ct run <path to rb file> [<args>]`)
5+
6+
The recorder for Ruby is currently hosted in the [codetracer-ruby-recorder](https://github.com/metacraft-labs/codetracer-ruby-recorder) repo.
7+
8+
You can read its README for more details. We are welcoming contributors!
9+

0 commit comments

Comments
 (0)