Skip to content

Latest commit

 

History

History
120 lines (94 loc) · 2.76 KB

File metadata and controls

120 lines (94 loc) · 2.76 KB

Getting Started

⇦ back

Prerequisites

  1. Deno
  2. CMake
  3. your system's vanilla C/C++ toolchain (GCC, Clang or MSVC)
  4. optional (but recommended): Ninja

Building the Hello World project

Note

On Windows cmd.exe, run fibs instead of ./fibs

Note

On Windows with VS2026, you need a very recent cmake (4.2+) and everything needs to run inside the Developer Command Prompt for VS (earlier VS versions also work outside the developer command prompt)

Clone, build and run a native release build:

# clone
git clone https://github.com/floooh/fibs-hello-world
cd fibs-hello-world
# build with default build config
./fibs build
# run
./fibs run hello

If anything goes wrong, run ./fibs diag tools to check if any required tools are missing.

To build a native debug build:

# on macOS:
./fibs config macos-make-debug
# on on Linux:
./fibs config linux-make-debug
# on Windows:
./fibs config win-msvc-debug

./fibs build
./fibs run hello

Open the project in an IDE

Note

FIXME: this needs updating since IDE openers have moved into floooh/fibs-extras

  1. Configure with one of the IDE build configs, e.g.:

    # on macOS:
    ./fibs config macos-xcode-debug
    ./fibs config macos-vscode-debug
    # on Windows:
    ./fibs config win-vstudio-debug
    ./fibs config win-vscode-debug
    # on Linux:
    ./fibs config linux-vscode-debug
  2. then run ./fibs open to open the project in VSCode, XCode or VStudio:

    ./fibs open

Build the Hello World example for WASI

...in the fibs-hello-world directory from above:

  1. Run ./fibs diag tools and make sure that ninja, tar and wasmtime is installed and found:

    ./fibs diag tools
    ...
    ninja:  found
    ...
    tar:    found
    wasmtime:       found
  2. Install the WASI SDK:

    ./fibs wasisdk install
  3. Run ./fibs list configs, note the wasi-* configs:

    ./fibs list configs
    ...
    wasi-make-debug
    wasi-make-release
    wasi-ninja-debug
    wasi-ninja-release
    wasi-vscode-debug
    wasi-vscode-release
  4. Configure with wasi-ninja-debug, build and run:

    ./fibs config wasi-ninja-debug
    ./fibs build
    ./fibs run --verbose hello
  5. Uninstall WASI SDK:

    ./fibs wasisdk uninstall