Serene Runtime 1.0.0
C runtime for the Serene programming language
Loading...
Searching...
No Matches
usage Directory Reference
Directory dependency graph for usage:

Directories

 cmake
 
 make
 
 meson
 

Detailed Description

Three minimal "hello world" programs that link an installed libserene.runtime and run a fiber. Each builds with a different build system, and all three find the runtime through pkg-config, so they need no hard-coded paths.

They use only the substrate (memory manager, engine/context, fibers), so they work against a runtime built with the Serene language layer disabled:

# from the runtime/ source tree
meson setup --prefix=/usr/local -Dwith-serene=disabled build-install
meson install -C build-install # may need sudo for a system prefix

That installs the headers under $prefix/include/serene/, the static library, and serene.runtime.pc. Point pkg-config at it:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig # or .../lib64/pkgconfig

Then build any of the examples:

# GNU Make
cd make && make && ./hello
# Meson
cd meson && meson setup build && meson compile -C build && ./build/hello
# CMake
cd cmake && cmake -S . -B build && cmake --build build && ./build/hello

Each prints:

hello from a Serene fiber (substrate runtime)

Notes: