Skip to content

Commit d74bc11

Browse files
committed
Enable auto lightfuncs in ROM example build
1 parent fd85898 commit d74bc11

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

util/example_rombuild.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ PYTHON=`which python2 python | head -1`
1212
make clean
1313
$PYTHON util/make_dist.py \
1414
--rom-support \
15+
--rom-auto-lightfunc \
1516
--user-builtin-metadata util/example_user_builtins1.yaml \
1617
--user-builtin-metadata util/example_user_builtins2.yaml
1718

@@ -37,6 +38,7 @@ make duk dukd # XXX: currently fails to start, DUK_CMDLINE_LOGGING_SUPPORT, DUK
3738
$PYTHON config/genconfig.py \
3839
--metadata config \
3940
--output dist/src/duk_config.h \
41+
--option-file config/examples/low_memory.yaml \
4042
-DDUK_USE_ROM_STRINGS \
4143
-DDUK_USE_ROM_OBJECTS \
4244
-DDUK_USE_ROM_GLOBAL_INHERIT \

util/example_user_builtins1.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ objects:
139139

140140
# Example of plain value types supported at the moment:
141141
#
142-
# - Object, function, and accessor types not illustrated here
143-
# (see src/builtins.yaml for examples of those).
142+
# - Object, function, lightfunc, and accessor types not illustrated
143+
# here (see src/builtins.yaml for examples of those).
144144
#
145145
# - Duktape buffer and pointer types cannot be used by built-in
146146
# objects at the moment.
@@ -187,6 +187,16 @@ objects:
187187
value: "foobar" # Encode string as UTF-8, then map bytes to U+0000...U+00FF
188188
attributes: wec
189189

190+
#- key: "lightfuncType"
191+
# value:
192+
# type: lightfunc
193+
# native: duk_bi_math_object_random
194+
# nargs: 0
195+
# varargs: false
196+
# length: 13
197+
# magic: 0
198+
# attributes: wec
199+
190200
# Object IDs are only resolved when metadata loading is complete, so it's
191201
# OK to create reference loops or refer to objects defined later (even in
192202
# a separate YAML file not yet loaded).

0 commit comments

Comments
 (0)