mirror of
https://github.com/janet-lang/janet
synced 2026-09-22 00:48:42 +00:00
Add source amalgamation
The amalgamated source concatenates all sources to a file janet.c which can be used for embedding janet, much in the same way as sqlite or mongoose.
This commit is contained in:
+4
-2
@@ -20,10 +20,12 @@
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef JANET_AMALG
|
||||
#include <janet/janet.h>
|
||||
#include "compile.h"
|
||||
#include "state.h"
|
||||
#include "util.h"
|
||||
#endif
|
||||
|
||||
/* Generated bytes */
|
||||
extern const unsigned char *janet_gen_core;
|
||||
@@ -236,7 +238,7 @@ static Janet janet_core_hash(int32_t argc, Janet *argv) {
|
||||
return janet_wrap_number(janet_hash(argv[0]));
|
||||
}
|
||||
|
||||
static const JanetReg cfuns[] = {
|
||||
static const JanetReg corelib_cfuns[] = {
|
||||
{"native", janet_core_native,
|
||||
JDOC("(native path [,env])\n\n"
|
||||
"Load a native module from the given path. The path "
|
||||
@@ -596,7 +598,7 @@ JanetTable *janet_core_env(void) {
|
||||
Janet ret = janet_wrap_table(env);
|
||||
|
||||
/* Load main functions */
|
||||
janet_cfuns(env, NULL, cfuns);
|
||||
janet_cfuns(env, NULL, corelib_cfuns);
|
||||
|
||||
#ifndef JANET_NO_BOOTSTRAP
|
||||
janet_quick_asm(env, JANET_FUN_YIELD, "debug", 0, 1, debug_asm, sizeof(debug_asm),
|
||||
|
||||
Reference in New Issue
Block a user