<commit_before>LIBUV= ../../deps/libuv

# Make sure to `make distclean` before building when changing CC.
# Default build is debug mode.
CC= cc -g
# Uncomment the following to make a small binary
# CC= cc -Os
# Uncomment the following to make a static musl binary on linux
# CC= musl-gcc -Os -static

nucleus: main.o miniz.o duktape.o duv/duv.a ${LIBUV}/.libs/libuv.a env.o rust_path/target/release/libc_path.a
	${CC} $^ -lm -lpthread -o $@ rust_path/target/release/libc_path.a -ldl

rust_path/target/release/libc_path.a: rust_path/src/lib.rs rust_path/src/helpers.rs
	cd rust_path && cargo build --release

install: nucleus
	install nucleus /usr/local/bin/

test: test-dir test-zip test-app test-app-tiny

test-dir: nucleus
	./nucleus ../../test/manual -- 1 2 3

test-zip: nucleus app.zip
	./nucleus app.zip -- 4 5 6

test-app: app
	./app 7 8 9

test-app-tiny: app-tiny
	./app-tiny 10 11 12
<commit_msg>`make test` now correctly runs from impl/duktape<commit_after>LIBUV= ../../deps/libuv

# Make sure to `make distclean` before building when changing CC.
# Default build is debug mode.
CC= cc -g
# Uncomment the following to make a small binary
# CC= cc -Os
# Uncomment the following to make a static musl binary on linux
# CC= musl-gcc -Os -static

nucleus: main.o miniz.o duktape.o duv/duv.a ${LIBUV}/.libs/libuv.a env.o rust_path/target/release/libc_path.a
	${CC} $^ -lm -lpthread -o $@ rust_path/target/release/libc_path.a -ldl

rust_path/target/release/libc_path.a: rust_path/src/lib.rs rust_path/src/helpers.rs
	cd rust_path && cargo build --release

install: nucleus
	install nucleus /usr/local/bin/

test:
	make -C ../.. test-duktape

test-manual: test-dir test-zip test-app test-app-tiny

test-dir: nucleus
	./nucleus ../../test/manual -- 1 2 3

test-zip: nucleus app.zip
	./nucleus app.zip -- 4 5 6

test-app: app
	./app 7 8 9

test-app-tiny: app-tiny
	./app-tiny 10 11 12

{'fraction_non_alphanumeric': 0.1336870026525199, 'fraction_numerical': 0.015915119363395226, 'mean_word_length': 3.1269146608315097, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '499958', 'n_tokens_mistral': 769, 'n_tokens_neox': 695, 'n_words': 220}