Trivial Janet project with a bundled native C module
This is the simplest example of how to write a Janet project which is a mixture of C and Janet, which results in a single, statically-linked executable.
make to build and test the executable
foo.c is a Janet native C module which implements a namespace
which contains one function
which returns the number
To build and test this module, run
You can also start a interactive REPL with this module imported via
make repl-foo (type
(foo/bar) at the prompt).
baz.janet is a Janet program which imports the
foo module, then prints
foo/bar multiplied by 2.
To build and test the
build/baz statically-linked executable, run
make test-baz, or simply