@tishlang/tish-format 1.0.12 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.toml +51 -0
- package/LICENSE +13 -0
- package/bin/tish-format +0 -0
- package/crates/js_to_tish/Cargo.toml +11 -0
- package/crates/js_to_tish/README.md +18 -0
- package/crates/js_to_tish/src/error.rs +55 -0
- package/crates/js_to_tish/src/lib.rs +11 -0
- package/crates/js_to_tish/src/span_util.rs +35 -0
- package/crates/js_to_tish/src/transform/expr.rs +611 -0
- package/crates/js_to_tish/src/transform/stmt.rs +503 -0
- package/crates/js_to_tish/src/transform.rs +60 -0
- package/crates/tish/Cargo.toml +62 -0
- package/crates/tish/build.rs +21 -0
- package/crates/tish/src/cargo_native_registry.rs +32 -0
- package/crates/tish/src/cli_help.rs +576 -0
- package/crates/tish/src/main.rs +853 -0
- package/crates/tish/src/repl_completion.rs +199 -0
- package/crates/tish/tests/cargo_example_compile.rs +67 -0
- package/crates/tish/tests/error_source_location.rs +36 -0
- package/crates/tish/tests/fixtures/cargo_example_project/Cargo.toml +3 -0
- package/crates/tish/tests/fixtures/cargo_example_project/crates/demo-shim/Cargo.toml +11 -0
- package/crates/tish/tests/fixtures/cargo_example_project/crates/demo-shim/src/lib.rs +12 -0
- package/crates/tish/tests/fixtures/cargo_example_project/package.json +10 -0
- package/crates/tish/tests/fixtures/cargo_example_project/src/main.tish +3 -0
- package/crates/tish/tests/fixtures/runtime_error_location.tish +5 -0
- package/crates/tish/tests/fixtures/trycatch_runtime_errors.tish +15 -0
- package/crates/tish/tests/fixtures/tty_capability.tish +9 -0
- package/crates/tish/tests/integration_test.rs +1406 -0
- package/crates/tish/tests/run_optimize_stdout_parity.rs +50 -0
- package/crates/tish/tests/shortcircuit.rs +65 -0
- package/crates/tish/tests/trycatch_runtime_errors.rs +45 -0
- package/crates/tish/tests/tty_capability.rs +43 -0
- package/crates/tish_ast/Cargo.toml +9 -0
- package/crates/tish_ast/src/ast.rs +649 -0
- package/crates/tish_ast/src/lib.rs +5 -0
- package/crates/tish_build_utils/Cargo.toml +11 -0
- package/crates/tish_build_utils/src/lib.rs +577 -0
- package/crates/tish_builtins/Cargo.toml +22 -0
- package/crates/tish_builtins/src/array.rs +803 -0
- package/crates/tish_builtins/src/collections.rs +481 -0
- package/crates/tish_builtins/src/construct.rs +199 -0
- package/crates/tish_builtins/src/date.rs +538 -0
- package/crates/tish_builtins/src/globals.rs +293 -0
- package/crates/tish_builtins/src/helpers.rs +35 -0
- package/crates/tish_builtins/src/iterator.rs +129 -0
- package/crates/tish_builtins/src/lib.rs +21 -0
- package/crates/tish_builtins/src/math.rs +89 -0
- package/crates/tish_builtins/src/number.rs +96 -0
- package/crates/tish_builtins/src/object.rs +36 -0
- package/crates/tish_builtins/src/string.rs +646 -0
- package/crates/tish_builtins/src/symbol.rs +83 -0
- package/crates/tish_builtins/src/typedarrays.rs +298 -0
- package/crates/tish_bytecode/Cargo.toml +17 -0
- package/crates/tish_bytecode/src/chunk.rs +164 -0
- package/crates/tish_bytecode/src/compiler.rs +2604 -0
- package/crates/tish_bytecode/src/encoding.rs +102 -0
- package/crates/tish_bytecode/src/lib.rs +20 -0
- package/crates/tish_bytecode/src/opcode.rs +185 -0
- package/crates/tish_bytecode/src/peephole.rs +189 -0
- package/crates/tish_bytecode/src/serialize.rs +193 -0
- package/crates/tish_bytecode/tests/break_continue_bytecode.rs +44 -0
- package/crates/tish_bytecode/tests/constant_folding.rs +84 -0
- package/crates/tish_bytecode/tests/sort_optimization.rs +31 -0
- package/crates/tish_compile/Cargo.toml +27 -0
- package/crates/tish_compile/src/check.rs +774 -0
- package/crates/tish_compile/src/codegen.rs +7317 -0
- package/crates/tish_compile/src/infer.rs +1681 -0
- package/crates/tish_compile/src/lib.rs +206 -0
- package/crates/tish_compile/src/resolve.rs +1951 -0
- package/crates/tish_compile/src/types.rs +605 -0
- package/crates/tish_compile_js/Cargo.toml +18 -0
- package/crates/tish_compile_js/examples/jsx_vdom_smoke.tish +8 -0
- package/crates/tish_compile_js/src/codegen.rs +938 -0
- package/crates/tish_compile_js/src/error.rs +20 -0
- package/crates/tish_compile_js/src/lib.rs +26 -0
- package/crates/tish_compile_js/src/tests_jsx.rs +414 -0
- package/crates/tish_compiler_wasm/Cargo.toml +21 -0
- package/crates/tish_compiler_wasm/src/lib.rs +57 -0
- package/crates/tish_compiler_wasm/src/resolve_virtual.rs +473 -0
- package/crates/tish_core/Cargo.toml +32 -0
- package/crates/tish_core/src/console_style.rs +170 -0
- package/crates/tish_core/src/json.rs +430 -0
- package/crates/tish_core/src/lib.rs +20 -0
- package/crates/tish_core/src/macros.rs +36 -0
- package/crates/tish_core/src/shape.rs +85 -0
- package/crates/tish_core/src/uri.rs +118 -0
- package/crates/tish_core/src/value.rs +1350 -0
- package/crates/tish_core/src/vmref.rs +183 -0
- package/crates/tish_cranelift/Cargo.toml +19 -0
- package/crates/tish_cranelift/src/lib.rs +43 -0
- package/crates/tish_cranelift/src/link.rs +130 -0
- package/crates/tish_cranelift/src/lower.rs +85 -0
- package/crates/tish_cranelift_runtime/Cargo.toml +26 -0
- package/crates/tish_cranelift_runtime/src/lib.rs +45 -0
- package/crates/tish_eval/Cargo.toml +51 -0
- package/crates/tish_eval/src/eval.rs +4265 -0
- package/crates/tish_eval/src/http.rs +191 -0
- package/crates/tish_eval/src/lib.rs +99 -0
- package/crates/tish_eval/src/natives.rs +551 -0
- package/crates/tish_eval/src/promise.rs +179 -0
- package/crates/tish_eval/src/regex.rs +299 -0
- package/crates/tish_eval/src/timers.rs +120 -0
- package/crates/tish_eval/src/value.rs +336 -0
- package/crates/tish_eval/src/value_convert.rs +117 -0
- package/crates/tish_ffi/Cargo.toml +26 -0
- package/crates/tish_ffi/src/lib.rs +518 -0
- package/crates/tish_ffi/tests/fixtures/testmod/Cargo.toml +18 -0
- package/crates/tish_ffi/tests/fixtures/testmod/src/lib.rs +46 -0
- package/crates/tish_ffi/tests/loader.rs +65 -0
- package/crates/tish_fmt/Cargo.toml +16 -0
- package/crates/tish_fmt/src/bin/tish-fmt.rs +41 -0
- package/crates/tish_fmt/src/lib.rs +2157 -0
- package/crates/tish_jsx_web/Cargo.toml +9 -0
- package/crates/tish_jsx_web/README.md +5 -0
- package/crates/tish_jsx_web/src/lib.rs +2 -0
- package/crates/tish_lexer/Cargo.toml +9 -0
- package/crates/tish_lexer/src/lib.rs +1104 -0
- package/crates/tish_lexer/src/token.rs +170 -0
- package/crates/tish_lint/Cargo.toml +18 -0
- package/crates/tish_lint/src/bin/tish-lint.rs +195 -0
- package/crates/tish_lint/src/lib.rs +281 -0
- package/crates/tish_llvm/Cargo.toml +13 -0
- package/crates/tish_llvm/src/lib.rs +115 -0
- package/crates/tish_lsp/Cargo.toml +25 -0
- package/crates/tish_lsp/README.md +26 -0
- package/crates/tish_lsp/src/builtin_goto.rs +362 -0
- package/crates/tish_lsp/src/import_goto.rs +564 -0
- package/crates/tish_lsp/src/main.rs +1459 -0
- package/crates/tish_native/Cargo.toml +16 -0
- package/crates/tish_native/src/build.rs +481 -0
- package/crates/tish_native/src/config.rs +48 -0
- package/crates/tish_native/src/lib.rs +416 -0
- package/crates/tish_opt/Cargo.toml +13 -0
- package/crates/tish_opt/src/lib.rs +1046 -0
- package/crates/tish_parser/Cargo.toml +11 -0
- package/crates/tish_parser/src/lib.rs +386 -0
- package/crates/tish_parser/src/parser.rs +2726 -0
- package/crates/tish_pg/Cargo.toml +34 -0
- package/crates/tish_pg/README.md +38 -0
- package/crates/tish_pg/src/error.rs +52 -0
- package/crates/tish_pg/src/lib.rs +955 -0
- package/crates/tish_resolve/Cargo.toml +13 -0
- package/crates/tish_resolve/src/lib.rs +3601 -0
- package/crates/tish_resolve/src/pos.rs +141 -0
- package/crates/tish_runtime/Cargo.toml +100 -0
- package/crates/tish_runtime/src/http.rs +1347 -0
- package/crates/tish_runtime/src/http_fetch.rs +492 -0
- package/crates/tish_runtime/src/http_hyper.rs +441 -0
- package/crates/tish_runtime/src/http_prefork.rs +189 -0
- package/crates/tish_runtime/src/lib.rs +1447 -0
- package/crates/tish_runtime/src/native_promise.rs +15 -0
- package/crates/tish_runtime/src/promise.rs +558 -0
- package/crates/tish_runtime/src/promise_io.rs +38 -0
- package/crates/tish_runtime/src/timers.rs +172 -0
- package/crates/tish_runtime/src/tty.rs +226 -0
- package/crates/tish_runtime/src/ws.rs +778 -0
- package/crates/tish_runtime/tests/fetch_readable_stream.rs +102 -0
- package/crates/tish_ui/Cargo.toml +17 -0
- package/crates/tish_ui/src/jsx.rs +692 -0
- package/crates/tish_ui/src/lib.rs +20 -0
- package/crates/tish_ui/src/runtime/hooks.rs +573 -0
- package/crates/tish_ui/src/runtime/mod.rs +183 -0
- package/crates/tish_vm/Cargo.toml +60 -0
- package/crates/tish_vm/src/jit.rs +1050 -0
- package/crates/tish_vm/src/lib.rs +41 -0
- package/crates/tish_vm/src/vm.rs +3536 -0
- package/crates/tish_vm/tests/concurrent_shared_state.rs +140 -0
- package/crates/tish_vm/tests/fixtures/or_string_cmd.tish +2 -0
- package/crates/tish_vm/tests/lexical_scope_declare.rs +34 -0
- package/crates/tish_vm/tests/peephole_jump_chain_logical_or.rs +150 -0
- package/crates/tish_wasm/Cargo.toml +15 -0
- package/crates/tish_wasm/src/lib.rs +428 -0
- package/crates/tish_wasm_runtime/Cargo.toml +37 -0
- package/crates/tish_wasm_runtime/src/gpu.rs +429 -0
- package/crates/tish_wasm_runtime/src/lib.rs +42 -0
- package/crates/tishlang_cargo_bindgen/Cargo.toml +26 -0
- package/crates/tishlang_cargo_bindgen/src/classify.rs +261 -0
- package/crates/tishlang_cargo_bindgen/src/discover.rs +125 -0
- package/crates/tishlang_cargo_bindgen/src/infer.rs +382 -0
- package/crates/tishlang_cargo_bindgen/src/lib.rs +349 -0
- package/crates/tishlang_cargo_bindgen/src/main.rs +167 -0
- package/crates/tishlang_cargo_bindgen/src/metadata.rs +117 -0
- package/justfile +276 -0
- package/package.json +2 -2
- package/platform/darwin-arm64/tish-fmt +0 -0
- package/platform/darwin-x64/tish-fmt +0 -0
- package/platform/linux-arm64/tish-fmt +0 -0
- package/platform/linux-x64/tish-fmt +0 -0
- package/platform/win32-x64/tish-fmt.exe +0 -0
package/justfile
ADDED
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
# Tish build recipes
|
|
2
|
+
# Install just: cargo install just OR brew install just
|
|
3
|
+
#
|
|
4
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
5
|
+
# TWO WAYS TO EXECUTE TISH PROGRAMS
|
|
6
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
7
|
+
#
|
|
8
|
+
# 1. RUN (Interpreter) - Execute directly, no build step:
|
|
9
|
+
# just run run hello.tish # runs via interpreter
|
|
10
|
+
# tish run hello.tish # if tish is in PATH
|
|
11
|
+
#
|
|
12
|
+
# 2. BUILD (native binary) - Create standalone executable:
|
|
13
|
+
# just run build hello.tish -o hello # builds native binary
|
|
14
|
+
# ./hello # run the standalone binary
|
|
15
|
+
#
|
|
16
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
17
|
+
# FEATURE FLAGS (compile-time security)
|
|
18
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
19
|
+
#
|
|
20
|
+
# - http : Network access (fetch, fetchAll, serve)
|
|
21
|
+
# - fs : File system access (readFile, writeFile, fileExists, readDir, mkdir)
|
|
22
|
+
# - process : Process control (process.exit, process.cwd, process.argv, process.env)
|
|
23
|
+
# - regex : Regular expression support (RegExp, String.match/replace/search/split)
|
|
24
|
+
# - full : All features enabled (http + fs + process + regex)
|
|
25
|
+
#
|
|
26
|
+
# Default: NO features enabled (secure mode)
|
|
27
|
+
|
|
28
|
+
# Default recipe - build secure (no dangerous features)
|
|
29
|
+
default: build-secure
|
|
30
|
+
|
|
31
|
+
# Build secure mode - no network, no fs, no process access
|
|
32
|
+
build-secure:
|
|
33
|
+
cargo build --release --no-default-features
|
|
34
|
+
|
|
35
|
+
# Build with all features (for development/trusted environments)
|
|
36
|
+
build-full:
|
|
37
|
+
cargo build --release --features full
|
|
38
|
+
|
|
39
|
+
# Build with specific features
|
|
40
|
+
build-http:
|
|
41
|
+
cargo build --release --no-default-features --features http
|
|
42
|
+
|
|
43
|
+
build-fs:
|
|
44
|
+
cargo build --release --no-default-features --features fs
|
|
45
|
+
|
|
46
|
+
build-process:
|
|
47
|
+
cargo build --release --no-default-features --features process
|
|
48
|
+
|
|
49
|
+
build-regex:
|
|
50
|
+
cargo build --release --no-default-features --features regex
|
|
51
|
+
|
|
52
|
+
# Build with multiple specific features
|
|
53
|
+
build-custom FEATURES:
|
|
54
|
+
cargo build --release --no-default-features --features "{{FEATURES}}"
|
|
55
|
+
|
|
56
|
+
# Run in secure mode (no dangerous features)
|
|
57
|
+
run-secure *ARGS:
|
|
58
|
+
cargo run --release --no-default-features -- {{ARGS}}
|
|
59
|
+
|
|
60
|
+
# Run with all features
|
|
61
|
+
run *ARGS:
|
|
62
|
+
cargo run --release --features full -- {{ARGS}}
|
|
63
|
+
|
|
64
|
+
# Run with specific features
|
|
65
|
+
run-http *ARGS:
|
|
66
|
+
cargo run --release --no-default-features --features http -- {{ARGS}}
|
|
67
|
+
|
|
68
|
+
run-fs *ARGS:
|
|
69
|
+
cargo run --release --no-default-features --features fs -- {{ARGS}}
|
|
70
|
+
|
|
71
|
+
run-regex *ARGS:
|
|
72
|
+
cargo run --release --no-default-features --features regex -- {{ARGS}}
|
|
73
|
+
|
|
74
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
75
|
+
# BUILD TISH PROGRAMS TO NATIVE BINARIES (just recipe name: compile → invokes `tish build`)
|
|
76
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
77
|
+
|
|
78
|
+
# Build a .tish file to native binary (with all features)
|
|
79
|
+
# Usage: just compile hello.tish hello
|
|
80
|
+
compile INPUT OUTPUT:
|
|
81
|
+
cargo run --release --features full -- build {{INPUT}} -o {{OUTPUT}}
|
|
82
|
+
|
|
83
|
+
# Compile with secure mode (no dangerous features)
|
|
84
|
+
compile-secure INPUT OUTPUT:
|
|
85
|
+
cargo run --release --no-default-features -- build {{INPUT}} -o {{OUTPUT}}
|
|
86
|
+
|
|
87
|
+
# Build compiler WASM (for playground, REPL, try-it). Output: tish_compiler.js, tish_compiler_bg.wasm
|
|
88
|
+
# Requires: rustup target add wasm32-unknown-unknown, cargo install wasm-bindgen-cli
|
|
89
|
+
build-compiler-wasm OUT_DIR:
|
|
90
|
+
mkdir -p "{{OUT_DIR}}"
|
|
91
|
+
cargo build -p tish_compiler_wasm --target wasm32-unknown-unknown --release
|
|
92
|
+
wasm-bindgen target/wasm32-unknown-unknown/release/tish_compiler_wasm.wasm --out-dir "{{OUT_DIR}}" --out-name tish_compiler --target web
|
|
93
|
+
|
|
94
|
+
# Compile to WebAssembly (browser) - produces .wasm, .js, .html
|
|
95
|
+
# Requires: rustup target add wasm32-unknown-unknown, cargo install wasm-bindgen-cli
|
|
96
|
+
compile-wasm INPUT OUTPUT:
|
|
97
|
+
cargo run --release -- build {{INPUT}} -o {{OUTPUT}} --target wasm
|
|
98
|
+
|
|
99
|
+
# Compile to WebAssembly (Wasmtime/WASI) - single .wasm, run with: wasmtime OUTPUT.wasm
|
|
100
|
+
# Requires: rustup target add wasm32-wasip1, wasmtime (curl -sSf https://wasmtime.dev/install.sh | bash)
|
|
101
|
+
compile-wasi INPUT OUTPUT:
|
|
102
|
+
cargo run --release -- build {{INPUT}} -o {{OUTPUT}} --target wasi
|
|
103
|
+
|
|
104
|
+
# Compile with specific features
|
|
105
|
+
# Usage: just compile-with "http fs" hello.tish hello
|
|
106
|
+
compile-with FEATURES INPUT OUTPUT:
|
|
107
|
+
cargo run --release --no-default-features --features "{{FEATURES}}" -- build {{INPUT}} -o {{OUTPUT}}
|
|
108
|
+
|
|
109
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
110
|
+
# TESTS
|
|
111
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
112
|
+
#
|
|
113
|
+
# just test # full workspace: unit tests (tish_compile, tish_opt, etc.) + tish integration
|
|
114
|
+
# just test-tish # tish package only (same as CI; no other crates' unit tests)
|
|
115
|
+
# just test-quick # tish only, skip slow backend tests (native/cranelift/wasi)
|
|
116
|
+
# just test-coverage # tish only + llvm-cov (writes lcov.info, coverage-html/)
|
|
117
|
+
# just test-cargo # plain cargo test (whole workspace, full features)
|
|
118
|
+
# just test-secure # cargo test, no features
|
|
119
|
+
#
|
|
120
|
+
# Regenerate static expected files: REGENERATE_EXPECTED=1 just test-tish test_mvp_programs_interpreter
|
|
121
|
+
|
|
122
|
+
# Run all tests in the workspace (unit tests in every crate + tish integration tests)
|
|
123
|
+
test *ARGS:
|
|
124
|
+
cargo nextest run --workspace --features full -- {{ARGS}}
|
|
125
|
+
|
|
126
|
+
# Run only tish package tests (same as CI: integration tests only)
|
|
127
|
+
test-tish *ARGS:
|
|
128
|
+
cargo nextest run -p tishlang --features full -- {{ARGS}}
|
|
129
|
+
|
|
130
|
+
# Skip slow backend tests (native/cranelift/wasi) for fast local iteration
|
|
131
|
+
test-quick:
|
|
132
|
+
cargo nextest run -p tishlang --features full -- --skip test_mvp_programs_native --skip test_mvp_programs_cranelift --skip test_mvp_programs_wasi
|
|
133
|
+
|
|
134
|
+
# Run tests with coverage (requires llvm-tools: rustup component add llvm-tools-preview)
|
|
135
|
+
test-coverage:
|
|
136
|
+
cargo llvm-cov nextest -p tishlang --features full --lcov --output-path lcov.info --html coverage-html
|
|
137
|
+
|
|
138
|
+
# Plain cargo test (whole workspace)
|
|
139
|
+
test-cargo:
|
|
140
|
+
cargo test --features full
|
|
141
|
+
|
|
142
|
+
# Test secure mode
|
|
143
|
+
test-secure:
|
|
144
|
+
cargo test --no-default-features
|
|
145
|
+
|
|
146
|
+
# Install tish CLI (secure mode - no dangerous features)
|
|
147
|
+
install *ARGS:
|
|
148
|
+
cargo install --path crates/tish --no-default-features {{ARGS}}
|
|
149
|
+
|
|
150
|
+
# Install tish CLI with all features
|
|
151
|
+
install-full *ARGS:
|
|
152
|
+
cargo install --path crates/tish --features full {{ARGS}}
|
|
153
|
+
|
|
154
|
+
# Check compilation for all feature combinations
|
|
155
|
+
check-all:
|
|
156
|
+
@echo "Checking secure mode (no features)..."
|
|
157
|
+
cargo check --no-default-features
|
|
158
|
+
@echo "Checking http only..."
|
|
159
|
+
cargo check --no-default-features --features http
|
|
160
|
+
@echo "Checking fs only..."
|
|
161
|
+
cargo check --no-default-features --features fs
|
|
162
|
+
@echo "Checking process only..."
|
|
163
|
+
cargo check --no-default-features --features process
|
|
164
|
+
@echo "Checking regex only..."
|
|
165
|
+
cargo check --no-default-features --features regex
|
|
166
|
+
@echo "Checking full mode..."
|
|
167
|
+
cargo check --features full
|
|
168
|
+
@echo "All feature combinations compile successfully!"
|
|
169
|
+
|
|
170
|
+
# Refresh tish_jsx_web vendor from lattish (sibling package in repo)
|
|
171
|
+
refresh-lattish:
|
|
172
|
+
cp ../lattish/src/Lattish.tish crates/tish_jsx_web/vendor/Lattish.tish
|
|
173
|
+
@echo "Vendor Lattish.tish refreshed from lattish"
|
|
174
|
+
|
|
175
|
+
# Clean build artifacts
|
|
176
|
+
clean:
|
|
177
|
+
cargo clean
|
|
178
|
+
|
|
179
|
+
# Format code
|
|
180
|
+
fmt:
|
|
181
|
+
cargo fmt --all
|
|
182
|
+
|
|
183
|
+
# Lint
|
|
184
|
+
lint:
|
|
185
|
+
cargo clippy --features full -- -D warnings
|
|
186
|
+
|
|
187
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
188
|
+
# TEST262 - JavaScript Conformance Tests
|
|
189
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
190
|
+
|
|
191
|
+
# Run all test262 tests
|
|
192
|
+
test262:
|
|
193
|
+
./scripts/run_test262.sh
|
|
194
|
+
|
|
195
|
+
# Run test262 tests with verbose output
|
|
196
|
+
test262-verbose:
|
|
197
|
+
./scripts/run_test262.sh --verbose
|
|
198
|
+
|
|
199
|
+
# Run filtered test262 tests (e.g., just test262-filter expressions)
|
|
200
|
+
test262-filter PATTERN:
|
|
201
|
+
./scripts/run_test262.sh --filter "{{PATTERN}}"
|
|
202
|
+
|
|
203
|
+
# Run test262 verbose with filter
|
|
204
|
+
test262-filter-verbose PATTERN:
|
|
205
|
+
./scripts/run_test262.sh --verbose --filter "{{PATTERN}}"
|
|
206
|
+
|
|
207
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
208
|
+
# PARITY COMPARE - Compare runtime outputs (interp vs vm, rust, cranelift, wasi, node)
|
|
209
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
210
|
+
#
|
|
211
|
+
# Run tests/core .tish (and .js) across runtimes; fail if any output differs from reference.
|
|
212
|
+
# Use to find VM/Cranelift/WASI/Node parity gaps (e.g. optional_chaining returns nothing on VM).
|
|
213
|
+
#
|
|
214
|
+
# just parity # all runtimes, all tests
|
|
215
|
+
# just parity optional_chaining # single test
|
|
216
|
+
# just parity "optional" # tests matching name
|
|
217
|
+
|
|
218
|
+
parity filter="":
|
|
219
|
+
#!/usr/bin/env bash
|
|
220
|
+
if [[ -n "{{filter}}" ]]; then
|
|
221
|
+
./scripts/run_parity_compare.sh --filter "{{filter}}"
|
|
222
|
+
else
|
|
223
|
+
./scripts/run_parity_compare.sh
|
|
224
|
+
fi
|
|
225
|
+
|
|
226
|
+
parity-verbose filter="":
|
|
227
|
+
#!/usr/bin/env bash
|
|
228
|
+
if [[ -n "{{filter}}" ]]; then
|
|
229
|
+
./scripts/run_parity_compare.sh --filter "{{filter}}" --verbose
|
|
230
|
+
else
|
|
231
|
+
./scripts/run_parity_compare.sh --verbose
|
|
232
|
+
fi
|
|
233
|
+
|
|
234
|
+
parity-limit N:
|
|
235
|
+
./scripts/run_parity_compare.sh --limit {{N}}
|
|
236
|
+
|
|
237
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
238
|
+
# UTILITIES
|
|
239
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
240
|
+
|
|
241
|
+
# Profile array_stress sections (run each isolated test with timing to find slow parts)
|
|
242
|
+
array-stress-profile:
|
|
243
|
+
./scripts/run_array_stress_profile.sh
|
|
244
|
+
|
|
245
|
+
# Profile optional_chaining sections (find which ?? or ?. operation freezes)
|
|
246
|
+
optional-chaining-profile:
|
|
247
|
+
./scripts/run_optional_chaining_profile.sh
|
|
248
|
+
|
|
249
|
+
# Performance benchmark (vm vs interp vs cranelift vs wasi vs Node)
|
|
250
|
+
perf *ARGS:
|
|
251
|
+
./scripts/run_performance_manual.sh {{ARGS}}
|
|
252
|
+
|
|
253
|
+
# Bundled perf suite: per-test table + whole-program timings (tests/main.tish); add --verbose for full stdout
|
|
254
|
+
perf-suite *ARGS:
|
|
255
|
+
./scripts/run_performance_suite.sh {{ARGS}}
|
|
256
|
+
|
|
257
|
+
# Regenerate tests/main.tish + tests/main.js after changing paired pure perf tests
|
|
258
|
+
perf-suite-gen:
|
|
259
|
+
./scripts/generate_perf_ci_main.sh
|
|
260
|
+
|
|
261
|
+
# HTTP throughput: tish vs Node, single vs multi-worker, plaintext + json (needs oha + jq)
|
|
262
|
+
perf-http *ARGS:
|
|
263
|
+
./scripts/run_http_perf.sh {{ARGS}}
|
|
264
|
+
|
|
265
|
+
# Perf gauntlet: compute benchmarks vs Node, incl. known-fail targets to evolve past (needs node)
|
|
266
|
+
perf-gauntlet *ARGS:
|
|
267
|
+
./scripts/run_perf_gauntlet.sh {{ARGS}}
|
|
268
|
+
|
|
269
|
+
# Show binary sizes for different builds
|
|
270
|
+
sizes:
|
|
271
|
+
@echo "Building secure binary..."
|
|
272
|
+
cargo build --release --no-default-features
|
|
273
|
+
@ls -lh target/release/tish | awk '{print "Secure (no features):", $5}'
|
|
274
|
+
@echo "Building full binary..."
|
|
275
|
+
cargo build --release --features full
|
|
276
|
+
@ls -lh target/release/tish | awk '{print "Full (all features):", $5}'
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|