Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions Makefile

This file was deleted.

39 changes: 35 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,46 @@ The interpreter traverses the AST in breadth-first order, calling functions on i

## Building

This code is made to build on a Unix-compatible machine (sorry Windows users). Just call `make` and it will output the server binary in `bin/server`. There are no other dependencies.
This code is mostly cross-platform. The Basic interactive shell is cross-platform, but the server target is currently only buildable on Unix-like systems.

But before that, you need to have the two folders, `bin` and `obj` present in the project directory, if not present.
CMake is required to build this project. No other external libraries are needed.

### Steps to build

1. Create a "build" directory to store all the build artifacts, and cd into the directory.

```shell
mkdir build
cd build/
```

2. Configure the project

```shell
cmake ..
```

3. Build the whole project

```shell
cmake --build .
```

## Running

From the repository folder, run `bin/server`. Don't run it from the bin directory, as it requires the *static* folder to be present in the pwd (You can just move one or the other so that those two are in the same directory).
### Interactive shell

You can run the interactive shell, which is the `BasicIO` target as:

```shell
build/BasicIO
```

### Server

From the repository folder, run `build/server`. Don't run it from the build directory, as it requires the *static* folder to be present in the pwd (You can just move one or the other so that those two are in the same directory).

This will start an HTTP server on port `1111` (You can change this by changing `LISTEN_PORT` constant in `main.c`)
This will start an HTTP server on port `1111` (You can change this by changing `LISTEN_PORT` constant in `http_server_main.c`)

Start a browser and head over to [http://localhost:1111/](http://localhost:1111/). It will present to you a sort-of IDE where you can type in code and execute it.

Expand Down
Loading