The stdlib ships with the compiler. Your own code packs into a .slib you drop in libs/. A package manager is not here yet.
Create a library, pack it into one file, copy that file into another project. Folder libraries work too if you do not want to pack.
sere init-lib mathlib
cd mathlib
sere pack
copy dist\mathlib.slib ..\myapp\libs\import mathlib
def main() -> i32:
return mathlib.add(2, 3)The entry, the local modules it actually imports, and compiled native objects. Unused files next to the library stay out.
libs/mylib/lib.sere or mylib.sere, plus optional .c / native/. Same import, no pack step.
Prelude is always there. Everything else is import.
Always injected: print, abs, min, max, Int / Float, dbg!.
read_line, eprint — extra I/O on top of the print intrinsic.
Files, paths, process, and the host.
Text and binary. Backtick literals type as regex.
Numeric work and linear algebra.
Utilities you reach for in a real binary.
Collectors, arenas, pointer vocabulary.
label and describe — not the builtin typeof / dir.
html: raw macro plus the Html wrapper.
Win32, OpenGL 2.1+, Qt widgets (stub if missing).
HTTP client: get, post, put, delete.
Blocking HTTP server. Subclass Handler and implement handle.