a standard C library for Mojo programming language.
https://mojothon.github.io/libc/ β HEALTH ? 80 / Healthy
a standard C library for Mojo programming language.
https://mojothon.github.io/libc/ β// readme
A standard C library binding for the Mojo programming language.
Every C header is exposed as a Mojo sub-package β libc.math, libc.string,
libc.unistd, libc.sys.socket, β¦ β so external_call boilerplate lives in
one place and your code reads like the C it replaces.
>=1.1.0,<2linux-64, osx-arm64pixi add --from https://conda.modular.com/max --channel mojo-force libc
from libc.math import sqrt
from libc.unistd import getpid
def main():
print(sqrt(2.0), getpid())
The project uses pixi; magic/mojoproject.toml are gone.
pixi install # default environment (Mojo toolchain)
pixi run test # run the test suite
pixi run package # build dist/libc.mojoc
pixi run format # apply mojo format
pixi run format-check # fail if the tree is not formatted
pixi run check-prototypes # fail if a call does not match the C prototype
pixi run check-release # fail if the version is not the same everywhere it is said
pixi run check-channels # fail if the docs name a condaβ¦