Update homepage

2026-03-08 20:13:59 +00:00
parent 30e1f2eb53
commit ac0e4a54b6

104
Home.md

@@ -1 +1,103 @@
Welcome to the Wiki.
# Wizard Apprentice Standard Library
The Wizard's Apprentice Standard Library (`wapp` for short) is a collection of C/C++ utilities that are meant as a replacement to several parts of the standard libraries of both these languages. It's mostly a C11 library with some C++11 functionality used when necessary.
## Building
The library is mainly developed on Linux/macOS, so it uses `make` for building the code. However, it mostly uses it as a task runner rather than a full fledged build system.
Clone the repo to your computer.
```bash
git clone https://git.thewizardapprentice.com/abdelrahman/wizapp-stdlib.git
cd wizapp-stdlib
```
To build the library and run the tests, simply run
```bash
./build
```
For more info on the available variables and targets, run
```bash
make help
```
On Windows, you can run the `build.ps` script in PowerShell. This will also build the library using Microsoft's `msvc` compiler and run the tests. However, this PowerShell script isn't at feature parity yet with the available Makefile.
While this might seem as a limitation, the library is basically structured so you don't even need any build system.
## Library Structure
The `src` directory of the library has the following structure
```
src/
├── base
│   ├── array
│   ├── dbl_list
│   ├── mem
│   │   ├── allocator
│   │   └── utils
│   ├── queue
│   └── strings
│   └── str8
├── common
│   ├── aliases
│   ├── assert
│   ├── misc
│   └── platform
├── os
│   ├── allocators
│   │   └── arena
│   ├── cpath
│   ├── file
│   │   ├── posix
│   │   └── win
│   ├── mem
│   │   ├── posix
│   │   └── win
│   └── shell
│   ├── commander
│   │   ├── posix
│   │   └── win
│   ├── termcolour
│   │   ├── posix
│   │   └── win
│   └── utils
├── prng
│   └── xorshift
├── testing
│   └── tester
└── uuid
```
Each subdirectory living directly under the `src` directory acts as a self contained package. Some of these packages depend on other packages in the library, however, there is no need to know anything about these dependencies. The library relies on relative imports to ensure that all dependencies are resolved correctly. Each package comes with one header file and one source file that include all the dependencies.
```
src/
├── base
│   ├── wapp_base.c
│   └── wapp_base.h
├── common
│   └── wapp_common.h
├── os
│   ├── wapp_os.c
│   └── wapp_os.h
├── prng
│   ├── wapp_prng.c
│   ├── wapp_prng.h
├── testing
│   ├── wapp_testing.c
│   └── wapp_testing.h
├── uuid
│   ├── wapp_uuid.c
│   └── wapp_uuid.h
├── wapp.c
└── wapp.h
```
You can basically include the header file and use source file and you would effectively be using that package. This also applies to the full library. If you include `wapp.h` and add `wapp.c` as part of your build step, you would be effectively using the whole library. This way, you don't even need to use any build systems.