ripex 0.3.1__tar.gz
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.
- ripex-0.3.1/.github/workflows/cargo-release.yml +108 -0
- ripex-0.3.1/.github/workflows/ci.yml +437 -0
- ripex-0.3.1/.github/workflows/node-release.yml +457 -0
- ripex-0.3.1/.github/workflows/python-release.yml +286 -0
- ripex-0.3.1/.github/workflows/release.yml +267 -0
- ripex-0.3.1/.gitignore +32 -0
- ripex-0.3.1/CHANGELOG.md +106 -0
- ripex-0.3.1/Cargo.lock +863 -0
- ripex-0.3.1/Cargo.toml +87 -0
- ripex-0.3.1/LICENSE +21 -0
- ripex-0.3.1/PKG-INFO +61 -0
- ripex-0.3.1/README.md +288 -0
- ripex-0.3.1/RELEASE.md +129 -0
- ripex-0.3.1/SECURITY.md +26 -0
- ripex-0.3.1/benches/parse_all_langs.rs +50 -0
- ripex-0.3.1/bindings/python/Cargo.lock +263 -0
- ripex-0.3.1/bindings/python/Cargo.toml +17 -0
- ripex-0.3.1/bindings/python/README.md +37 -0
- ripex-0.3.1/bindings/python/rust-toolchain.toml +2 -0
- ripex-0.3.1/bindings/python/src/lib.rs +1507 -0
- ripex-0.3.1/bindings/python/tests/test_ripex.py +281 -0
- ripex-0.3.1/docs/ARCHITECTURE.md +94 -0
- ripex-0.3.1/docs/BENCHMARKS.md +71 -0
- ripex-0.3.1/docs/README.md +29 -0
- ripex-0.3.1/docs/TESTING.md +74 -0
- ripex-0.3.1/examples/evidence/c.rs +32 -0
- ripex-0.3.1/examples/evidence/cpp.rs +44 -0
- ripex-0.3.1/examples/evidence/csharp.rs +33 -0
- ripex-0.3.1/examples/evidence/go.rs +37 -0
- ripex-0.3.1/examples/evidence/javascript.rs +29 -0
- ripex-0.3.1/examples/evidence/mod.rs +96 -0
- ripex-0.3.1/examples/evidence/python.rs +36 -0
- ripex-0.3.1/examples/evidence/rust.rs +38 -0
- ripex-0.3.1/examples/evidence/typescript.rs +34 -0
- ripex-0.3.1/examples/evidence_report.rs +502 -0
- ripex-0.3.1/examples/probe.rs +31 -0
- ripex-0.3.1/examples/probe_file.rs +28 -0
- ripex-0.3.1/examples/scan.rs +54 -0
- ripex-0.3.1/pyproject.toml +37 -0
- ripex-0.3.1/python/ripex/__init__.py +160 -0
- ripex-0.3.1/python/ripex/_ripex.pyi +275 -0
- ripex-0.3.1/python/ripex/py.typed +0 -0
- ripex-0.3.1/rust-toolchain.toml +3 -0
- ripex-0.3.1/scripts/run-fuzz.sh +85 -0
- ripex-0.3.1/scripts/run-tests.sh +15 -0
- ripex-0.3.1/src/arena.rs +70 -0
- ripex-0.3.1/src/c/ast/expr.rs +120 -0
- ripex-0.3.1/src/c/ast/mod.rs +13 -0
- ripex-0.3.1/src/c/ast/stmt.rs +87 -0
- ripex-0.3.1/src/c/codegen/mod.rs +511 -0
- ripex-0.3.1/src/c/config/mod.rs +3 -0
- ripex-0.3.1/src/c/config/options.rs +24 -0
- ripex-0.3.1/src/c/diagnostics/mod.rs +3 -0
- ripex-0.3.1/src/c/facts.rs +492 -0
- ripex-0.3.1/src/c/lexer/keywords.rs +54 -0
- ripex-0.3.1/src/c/lexer/mod.rs +616 -0
- ripex-0.3.1/src/c/lexer/scanner.rs +89 -0
- ripex-0.3.1/src/c/lexer/token.rs +230 -0
- ripex-0.3.1/src/c/mod.rs +18 -0
- ripex-0.3.1/src/c/parser/declarations.rs +65 -0
- ripex-0.3.1/src/c/parser/expressions.rs +615 -0
- ripex-0.3.1/src/c/parser/mod.rs +27 -0
- ripex-0.3.1/src/c/parser/recovery.rs +50 -0
- ripex-0.3.1/src/c/parser/state.rs +154 -0
- ripex-0.3.1/src/c/parser/statements.rs +598 -0
- ripex-0.3.1/src/c/semantic/bindings.rs +11 -0
- ripex-0.3.1/src/c/semantic/mod.rs +7 -0
- ripex-0.3.1/src/c/semantic/scope.rs +134 -0
- ripex-0.3.1/src/c/semantic/symbols.rs +58 -0
- ripex-0.3.1/src/c/syntax/context.rs +22 -0
- ripex-0.3.1/src/c/syntax/features.rs +33 -0
- ripex-0.3.1/src/c/syntax/mod.rs +5 -0
- ripex-0.3.1/src/c/tests/fixtures/mod.rs +17 -0
- ripex-0.3.1/src/c/tests/mod.rs +179 -0
- ripex-0.3.1/src/c/transform/mod.rs +3 -0
- ripex-0.3.1/src/c/transform/pass.rs +11 -0
- ripex-0.3.1/src/c/visit/fold.rs +104 -0
- ripex-0.3.1/src/c/visit/mod.rs +6 -0
- ripex-0.3.1/src/c/visit/visitor.rs +10 -0
- ripex-0.3.1/src/c/visit/walk.rs +114 -0
- ripex-0.3.1/src/compiler.rs +1865 -0
- ripex-0.3.1/src/cpp/ast/expr.rs +111 -0
- ripex-0.3.1/src/cpp/ast/mod.rs +13 -0
- ripex-0.3.1/src/cpp/ast/stmt.rs +178 -0
- ripex-0.3.1/src/cpp/codegen/mod.rs +451 -0
- ripex-0.3.1/src/cpp/config/mod.rs +2 -0
- ripex-0.3.1/src/cpp/config/options.rs +25 -0
- ripex-0.3.1/src/cpp/diagnostics/mod.rs +3 -0
- ripex-0.3.1/src/cpp/facts.rs +479 -0
- ripex-0.3.1/src/cpp/lexer/keywords.rs +104 -0
- ripex-0.3.1/src/cpp/lexer/mod.rs +604 -0
- ripex-0.3.1/src/cpp/lexer/scanner.rs +89 -0
- ripex-0.3.1/src/cpp/lexer/token.rs +248 -0
- ripex-0.3.1/src/cpp/mod.rs +18 -0
- ripex-0.3.1/src/cpp/parser/declarations.rs +18 -0
- ripex-0.3.1/src/cpp/parser/expressions.rs +799 -0
- ripex-0.3.1/src/cpp/parser/mod.rs +33 -0
- ripex-0.3.1/src/cpp/parser/recovery.rs +79 -0
- ripex-0.3.1/src/cpp/parser/state.rs +154 -0
- ripex-0.3.1/src/cpp/parser/statements.rs +901 -0
- ripex-0.3.1/src/cpp/semantic/bindings.rs +13 -0
- ripex-0.3.1/src/cpp/semantic/mod.rs +7 -0
- ripex-0.3.1/src/cpp/semantic/scope.rs +151 -0
- ripex-0.3.1/src/cpp/semantic/symbols.rs +52 -0
- ripex-0.3.1/src/cpp/syntax/context.rs +23 -0
- ripex-0.3.1/src/cpp/syntax/features.rs +31 -0
- ripex-0.3.1/src/cpp/syntax/mod.rs +4 -0
- ripex-0.3.1/src/cpp/tests/fixtures/mod.rs +17 -0
- ripex-0.3.1/src/cpp/tests/mod.rs +169 -0
- ripex-0.3.1/src/cpp/transform/mod.rs +2 -0
- ripex-0.3.1/src/cpp/transform/pass.rs +12 -0
- ripex-0.3.1/src/cpp/visit/fold.rs +154 -0
- ripex-0.3.1/src/cpp/visit/mod.rs +6 -0
- ripex-0.3.1/src/cpp/visit/visitor.rs +15 -0
- ripex-0.3.1/src/cpp/visit/walk.rs +154 -0
- ripex-0.3.1/src/csharp/ast/expr.rs +138 -0
- ripex-0.3.1/src/csharp/ast/mod.rs +13 -0
- ripex-0.3.1/src/csharp/ast/stmt.rs +293 -0
- ripex-0.3.1/src/csharp/codegen/mod.rs +475 -0
- ripex-0.3.1/src/csharp/config/mod.rs +2 -0
- ripex-0.3.1/src/csharp/config/options.rs +26 -0
- ripex-0.3.1/src/csharp/diagnostics/mod.rs +3 -0
- ripex-0.3.1/src/csharp/facts.rs +896 -0
- ripex-0.3.1/src/csharp/lexer/keywords.rs +120 -0
- ripex-0.3.1/src/csharp/lexer/mod.rs +573 -0
- ripex-0.3.1/src/csharp/lexer/scanner.rs +89 -0
- ripex-0.3.1/src/csharp/lexer/token.rs +253 -0
- ripex-0.3.1/src/csharp/mod.rs +18 -0
- ripex-0.3.1/src/csharp/parser/declarations.rs +19 -0
- ripex-0.3.1/src/csharp/parser/expressions.rs +743 -0
- ripex-0.3.1/src/csharp/parser/mod.rs +33 -0
- ripex-0.3.1/src/csharp/parser/recovery.rs +105 -0
- ripex-0.3.1/src/csharp/parser/state.rs +158 -0
- ripex-0.3.1/src/csharp/parser/statements.rs +1326 -0
- ripex-0.3.1/src/csharp/semantic/bindings.rs +15 -0
- ripex-0.3.1/src/csharp/semantic/mod.rs +7 -0
- ripex-0.3.1/src/csharp/semantic/scope.rs +159 -0
- ripex-0.3.1/src/csharp/semantic/symbols.rs +50 -0
- ripex-0.3.1/src/csharp/syntax/context.rs +25 -0
- ripex-0.3.1/src/csharp/syntax/features.rs +31 -0
- ripex-0.3.1/src/csharp/syntax/mod.rs +4 -0
- ripex-0.3.1/src/csharp/tests/fixtures/mod.rs +7 -0
- ripex-0.3.1/src/csharp/tests/mod.rs +154 -0
- ripex-0.3.1/src/csharp/transform/mod.rs +2 -0
- ripex-0.3.1/src/csharp/transform/pass.rs +12 -0
- ripex-0.3.1/src/csharp/visit/fold.rs +133 -0
- ripex-0.3.1/src/csharp/visit/mod.rs +6 -0
- ripex-0.3.1/src/csharp/visit/visitor.rs +17 -0
- ripex-0.3.1/src/csharp/visit/walk.rs +158 -0
- ripex-0.3.1/src/diagnostics/codes.rs +84 -0
- ripex-0.3.1/src/diagnostics/error.rs +47 -0
- ripex-0.3.1/src/diagnostics/mod.rs +21 -0
- ripex-0.3.1/src/diagnostics/reporter.rs +90 -0
- ripex-0.3.1/src/facts.rs +617 -0
- ripex-0.3.1/src/go/ast/expr.rs +89 -0
- ripex-0.3.1/src/go/ast/mod.rs +13 -0
- ripex-0.3.1/src/go/ast/stmt.rs +90 -0
- ripex-0.3.1/src/go/codegen/mod.rs +552 -0
- ripex-0.3.1/src/go/config/mod.rs +3 -0
- ripex-0.3.1/src/go/config/options.rs +26 -0
- ripex-0.3.1/src/go/diagnostics/mod.rs +3 -0
- ripex-0.3.1/src/go/facts.rs +525 -0
- ripex-0.3.1/src/go/lexer/keywords.rs +56 -0
- ripex-0.3.1/src/go/lexer/mod.rs +486 -0
- ripex-0.3.1/src/go/lexer/scanner.rs +89 -0
- ripex-0.3.1/src/go/lexer/token.rs +225 -0
- ripex-0.3.1/src/go/mod.rs +18 -0
- ripex-0.3.1/src/go/parser/declarations.rs +32 -0
- ripex-0.3.1/src/go/parser/expressions.rs +611 -0
- ripex-0.3.1/src/go/parser/mod.rs +41 -0
- ripex-0.3.1/src/go/parser/recovery.rs +61 -0
- ripex-0.3.1/src/go/parser/state.rs +167 -0
- ripex-0.3.1/src/go/parser/statements.rs +638 -0
- ripex-0.3.1/src/go/semantic/bindings.rs +10 -0
- ripex-0.3.1/src/go/semantic/mod.rs +7 -0
- ripex-0.3.1/src/go/semantic/scope.rs +156 -0
- ripex-0.3.1/src/go/semantic/symbols.rs +58 -0
- ripex-0.3.1/src/go/syntax/context.rs +24 -0
- ripex-0.3.1/src/go/syntax/features.rs +27 -0
- ripex-0.3.1/src/go/syntax/mod.rs +5 -0
- ripex-0.3.1/src/go/tests/fixtures/mod.rs +39 -0
- ripex-0.3.1/src/go/tests/mod.rs +117 -0
- ripex-0.3.1/src/go/transform/mod.rs +3 -0
- ripex-0.3.1/src/go/transform/pass.rs +12 -0
- ripex-0.3.1/src/go/visit/fold.rs +149 -0
- ripex-0.3.1/src/go/visit/mod.rs +6 -0
- ripex-0.3.1/src/go/visit/visitor.rs +15 -0
- ripex-0.3.1/src/go/visit/walk.rs +146 -0
- ripex-0.3.1/src/js/ast/decl.rs +167 -0
- ripex-0.3.1/src/js/ast/expr.rs +900 -0
- ripex-0.3.1/src/js/ast/literal.rs +108 -0
- ripex-0.3.1/src/js/ast/mod.rs +18 -0
- ripex-0.3.1/src/js/ast/module.rs +164 -0
- ripex-0.3.1/src/js/ast/node.rs +5 -0
- ripex-0.3.1/src/js/ast/pattern.rs +104 -0
- ripex-0.3.1/src/js/ast/program.rs +22 -0
- ripex-0.3.1/src/js/ast/stmt.rs +274 -0
- ripex-0.3.1/src/js/codegen/minify.rs +125 -0
- ripex-0.3.1/src/js/codegen/mod.rs +6 -0
- ripex-0.3.1/src/js/codegen/printer.rs +1557 -0
- ripex-0.3.1/src/js/codegen/sourcemap.rs +123 -0
- ripex-0.3.1/src/js/config/mod.rs +5 -0
- ripex-0.3.1/src/js/config/options.rs +66 -0
- ripex-0.3.1/src/js/config/plugins.rs +46 -0
- ripex-0.3.1/src/js/diagnostics/codes.rs +1 -0
- ripex-0.3.1/src/js/diagnostics/error.rs +1 -0
- ripex-0.3.1/src/js/diagnostics/mod.rs +6 -0
- ripex-0.3.1/src/js/diagnostics/reporter.rs +1 -0
- ripex-0.3.1/src/js/facts.rs +1107 -0
- ripex-0.3.1/src/js/lexer/comments.rs +61 -0
- ripex-0.3.1/src/js/lexer/keywords.rs +85 -0
- ripex-0.3.1/src/js/lexer/mod.rs +695 -0
- ripex-0.3.1/src/js/lexer/numbers.rs +136 -0
- ripex-0.3.1/src/js/lexer/regex.rs +42 -0
- ripex-0.3.1/src/js/lexer/scanner.rs +103 -0
- ripex-0.3.1/src/js/lexer/strings.rs +140 -0
- ripex-0.3.1/src/js/lexer/token.rs +316 -0
- ripex-0.3.1/src/js/mod.rs +22 -0
- ripex-0.3.1/src/js/parser/declarations.rs +627 -0
- ripex-0.3.1/src/js/parser/expressions.rs +1539 -0
- ripex-0.3.1/src/js/parser/jsx.rs +267 -0
- ripex-0.3.1/src/js/parser/mod.rs +140 -0
- ripex-0.3.1/src/js/parser/modules.rs +470 -0
- ripex-0.3.1/src/js/parser/patterns.rs +313 -0
- ripex-0.3.1/src/js/parser/recovery.rs +80 -0
- ripex-0.3.1/src/js/parser/state.rs +481 -0
- ripex-0.3.1/src/js/parser/statements.rs +582 -0
- ripex-0.3.1/src/js/parser/typescript.rs +696 -0
- ripex-0.3.1/src/js/semantic/bindings.rs +23 -0
- ripex-0.3.1/src/js/semantic/mod.rs +9 -0
- ripex-0.3.1/src/js/semantic/resolver.rs +22 -0
- ripex-0.3.1/src/js/semantic/scope.rs +241 -0
- ripex-0.3.1/src/js/semantic/symbols.rs +58 -0
- ripex-0.3.1/src/js/syntax/context.rs +67 -0
- ripex-0.3.1/src/js/syntax/features.rs +42 -0
- ripex-0.3.1/src/js/syntax/mod.rs +7 -0
- ripex-0.3.1/src/js/syntax/precedence.rs +79 -0
- ripex-0.3.1/src/js/tests/lexer_tests.rs +204 -0
- ripex-0.3.1/src/js/tests/mod.rs +2 -0
- ripex-0.3.1/src/js/tests/parser_tests.rs +1136 -0
- ripex-0.3.1/src/js/transform/mod.rs +6 -0
- ripex-0.3.1/src/js/transform/pass.rs +6 -0
- ripex-0.3.1/src/js/transform/pipeline.rs +33 -0
- ripex-0.3.1/src/js/transform/plugins/jsx.rs +27 -0
- ripex-0.3.1/src/js/transform/plugins/mod.rs +7 -0
- ripex-0.3.1/src/js/transform/plugins/module_rewrite.rs +27 -0
- ripex-0.3.1/src/js/transform/plugins/typescript.rs +27 -0
- ripex-0.3.1/src/js/visit/fold.rs +349 -0
- ripex-0.3.1/src/js/visit/mod.rs +7 -0
- ripex-0.3.1/src/js/visit/visitor.rs +53 -0
- ripex-0.3.1/src/js/visit/walk.rs +552 -0
- ripex-0.3.1/src/lib.rs +671 -0
- ripex-0.3.1/src/limits.rs +8 -0
- ripex-0.3.1/src/main.rs +731 -0
- ripex-0.3.1/src/python/ast/decl.rs +36 -0
- ripex-0.3.1/src/python/ast/expr.rs +103 -0
- ripex-0.3.1/src/python/ast/literal.rs +18 -0
- ripex-0.3.1/src/python/ast/mod.rs +19 -0
- ripex-0.3.1/src/python/ast/node.rs +19 -0
- ripex-0.3.1/src/python/ast/pattern.rs +25 -0
- ripex-0.3.1/src/python/ast/stmt.rs +63 -0
- ripex-0.3.1/src/python/codegen/mod.rs +812 -0
- ripex-0.3.1/src/python/config/mod.rs +3 -0
- ripex-0.3.1/src/python/config/options.rs +26 -0
- ripex-0.3.1/src/python/diagnostics/mod.rs +4 -0
- ripex-0.3.1/src/python/facts.rs +545 -0
- ripex-0.3.1/src/python/lexer/comments.rs +16 -0
- ripex-0.3.1/src/python/lexer/keywords.rs +45 -0
- ripex-0.3.1/src/python/lexer/mod.rs +503 -0
- ripex-0.3.1/src/python/lexer/numbers.rs +110 -0
- ripex-0.3.1/src/python/lexer/scanner.rs +89 -0
- ripex-0.3.1/src/python/lexer/strings.rs +159 -0
- ripex-0.3.1/src/python/lexer/token.rs +216 -0
- ripex-0.3.1/src/python/mod.rs +18 -0
- ripex-0.3.1/src/python/parser/declarations.rs +15 -0
- ripex-0.3.1/src/python/parser/expressions.rs +804 -0
- ripex-0.3.1/src/python/parser/mod.rs +58 -0
- ripex-0.3.1/src/python/parser/recovery.rs +73 -0
- ripex-0.3.1/src/python/parser/state.rs +182 -0
- ripex-0.3.1/src/python/parser/statements.rs +863 -0
- ripex-0.3.1/src/python/semantic/bindings.rs +13 -0
- ripex-0.3.1/src/python/semantic/mod.rs +7 -0
- ripex-0.3.1/src/python/semantic/scope.rs +264 -0
- ripex-0.3.1/src/python/semantic/symbols.rs +58 -0
- ripex-0.3.1/src/python/syntax/context.rs +28 -0
- ripex-0.3.1/src/python/syntax/features.rs +36 -0
- ripex-0.3.1/src/python/syntax/mod.rs +5 -0
- ripex-0.3.1/src/python/tests/fixtures/mod.rs +31 -0
- ripex-0.3.1/src/python/tests/mod.rs +170 -0
- ripex-0.3.1/src/python/transform/mod.rs +3 -0
- ripex-0.3.1/src/python/transform/pass.rs +15 -0
- ripex-0.3.1/src/python/visit/fold.rs +204 -0
- ripex-0.3.1/src/python/visit/mod.rs +6 -0
- ripex-0.3.1/src/python/visit/visitor.rs +10 -0
- ripex-0.3.1/src/python/visit/walk.rs +253 -0
- ripex-0.3.1/src/rust/ast/expr.rs +119 -0
- ripex-0.3.1/src/rust/ast/mod.rs +13 -0
- ripex-0.3.1/src/rust/ast/stmt.rs +184 -0
- ripex-0.3.1/src/rust/codegen/mod.rs +672 -0
- ripex-0.3.1/src/rust/config/mod.rs +2 -0
- ripex-0.3.1/src/rust/config/options.rs +23 -0
- ripex-0.3.1/src/rust/diagnostics/mod.rs +3 -0
- ripex-0.3.1/src/rust/facts.rs +904 -0
- ripex-0.3.1/src/rust/lexer/keywords.rs +72 -0
- ripex-0.3.1/src/rust/lexer/mod.rs +568 -0
- ripex-0.3.1/src/rust/lexer/scanner.rs +89 -0
- ripex-0.3.1/src/rust/lexer/token.rs +262 -0
- ripex-0.3.1/src/rust/mod.rs +18 -0
- ripex-0.3.1/src/rust/parser/declarations.rs +43 -0
- ripex-0.3.1/src/rust/parser/expressions.rs +671 -0
- ripex-0.3.1/src/rust/parser/mod.rs +47 -0
- ripex-0.3.1/src/rust/parser/recovery.rs +73 -0
- ripex-0.3.1/src/rust/parser/state.rs +165 -0
- ripex-0.3.1/src/rust/parser/statements.rs +664 -0
- ripex-0.3.1/src/rust/semantic/bindings.rs +15 -0
- ripex-0.3.1/src/rust/semantic/mod.rs +7 -0
- ripex-0.3.1/src/rust/semantic/scope.rs +150 -0
- ripex-0.3.1/src/rust/semantic/symbols.rs +50 -0
- ripex-0.3.1/src/rust/syntax/context.rs +23 -0
- ripex-0.3.1/src/rust/syntax/features.rs +31 -0
- ripex-0.3.1/src/rust/syntax/mod.rs +4 -0
- ripex-0.3.1/src/rust/tests/fixtures/mod.rs +85 -0
- ripex-0.3.1/src/rust/tests/mod.rs +247 -0
- ripex-0.3.1/src/rust/transform/mod.rs +2 -0
- ripex-0.3.1/src/rust/transform/pass.rs +12 -0
- ripex-0.3.1/src/rust/visit/fold.rs +197 -0
- ripex-0.3.1/src/rust/visit/mod.rs +6 -0
- ripex-0.3.1/src/rust/visit/visitor.rs +14 -0
- ripex-0.3.1/src/rust/visit/walk.rs +159 -0
- ripex-0.3.1/src/span.rs +55 -0
- ripex-0.3.1/tests/cli_end_to_end.rs +215 -0
- ripex-0.3.1/tests/codegen_reuse.rs +437 -0
- ripex-0.3.1/tests/compiler_check.rs +149 -0
- ripex-0.3.1/tests/fuzz_isolate.rs +35 -0
- ripex-0.3.1/tests/fuzz_smoke.rs +128 -0
- ripex-0.3.1/tests/js_crash_probe.rs +48 -0
- ripex-0.3.1/tests/lang-test/.gitignore +7 -0
- ripex-0.3.1/tests/lang-test/c/compile_commands.json +27 -0
- ripex-0.3.1/tests/lang-test/c/main.c +22 -0
- ripex-0.3.1/tests/lang-test/c/models/product.c +9 -0
- ripex-0.3.1/tests/lang-test/c/models/product.h +16 -0
- ripex-0.3.1/tests/lang-test/c/models/user.c +42 -0
- ripex-0.3.1/tests/lang-test/c/models/user.h +17 -0
- ripex-0.3.1/tests/lang-test/c/services/service.c +12 -0
- ripex-0.3.1/tests/lang-test/c/utils/math.c +14 -0
- ripex-0.3.1/tests/lang-test/c/utils/math.h +10 -0
- ripex-0.3.1/tests/lang-test/cpp/compile_commands.json +22 -0
- ripex-0.3.1/tests/lang-test/cpp/main.cpp +23 -0
- ripex-0.3.1/tests/lang-test/cpp/models/product.cpp +13 -0
- ripex-0.3.1/tests/lang-test/cpp/models/product.hpp +25 -0
- ripex-0.3.1/tests/lang-test/cpp/models/user.cpp +20 -0
- ripex-0.3.1/tests/lang-test/cpp/models/user.hpp +28 -0
- ripex-0.3.1/tests/lang-test/cpp/services/service.cpp +25 -0
- ripex-0.3.1/tests/lang-test/cpp/utils/math.hpp +20 -0
- ripex-0.3.1/tests/lang-test/csharp/Models/Product.cs +19 -0
- ripex-0.3.1/tests/lang-test/csharp/Models/User.cs +29 -0
- ripex-0.3.1/tests/lang-test/csharp/Program.cs +22 -0
- ripex-0.3.1/tests/lang-test/csharp/RipexLangTest.csproj +9 -0
- ripex-0.3.1/tests/lang-test/csharp/Services/AsyncService.cs +33 -0
- ripex-0.3.1/tests/lang-test/csharp/Utils/MathUtil.cs +19 -0
- ripex-0.3.1/tests/lang-test/csharp/Utils/Strings.cs +20 -0
- ripex-0.3.1/tests/lang-test/go/go.mod +3 -0
- ripex-0.3.1/tests/lang-test/go/main.go +25 -0
- ripex-0.3.1/tests/lang-test/go/models/product.go +24 -0
- ripex-0.3.1/tests/lang-test/go/models/user.go +26 -0
- ripex-0.3.1/tests/lang-test/go/services/async.go +35 -0
- ripex-0.3.1/tests/lang-test/go/utils/math.go +26 -0
- ripex-0.3.1/tests/lang-test/go/utils/strings.go +23 -0
- ripex-0.3.1/tests/lang-test/java/App.java +7 -0
- ripex-0.3.1/tests/lang-test/javascript/jsconfig.json +13 -0
- ripex-0.3.1/tests/lang-test/javascript/package-lock.json +387 -0
- ripex-0.3.1/tests/lang-test/javascript/package.json +7 -0
- ripex-0.3.1/tests/lang-test/javascript/src/app.tsx +24 -0
- ripex-0.3.1/tests/lang-test/javascript/src/async.js +22 -0
- ripex-0.3.1/tests/lang-test/javascript/src/index.js +41 -0
- ripex-0.3.1/tests/lang-test/javascript/src/jsx.d.ts +8 -0
- ripex-0.3.1/tests/lang-test/javascript/src/models/product.js +29 -0
- ripex-0.3.1/tests/lang-test/javascript/src/models/user.js +46 -0
- ripex-0.3.1/tests/lang-test/javascript/src/types.ts +41 -0
- ripex-0.3.1/tests/lang-test/javascript/src/utils/collections.js +35 -0
- ripex-0.3.1/tests/lang-test/javascript/src/utils/math.js +37 -0
- ripex-0.3.1/tests/lang-test/javascript/src/utils/strings.js +34 -0
- ripex-0.3.1/tests/lang-test/javascript/src/validation.js +17 -0
- ripex-0.3.1/tests/lang-test/javascript/tsconfig.json +13 -0
- ripex-0.3.1/tests/lang-test/kotlin/App.kt +5 -0
- ripex-0.3.1/tests/lang-test/python/src/__init__.py +5 -0
- ripex-0.3.1/tests/lang-test/python/src/config.py +18 -0
- ripex-0.3.1/tests/lang-test/python/src/errors.py +15 -0
- ripex-0.3.1/tests/lang-test/python/src/main.py +24 -0
- ripex-0.3.1/tests/lang-test/python/src/models/product.py +21 -0
- ripex-0.3.1/tests/lang-test/python/src/models/user.py +30 -0
- ripex-0.3.1/tests/lang-test/python/src/services/async_service.py +20 -0
- ripex-0.3.1/tests/lang-test/python/src/utils/math_utils.py +23 -0
- ripex-0.3.1/tests/lang-test/python/src/utils/strings.py +31 -0
- ripex-0.3.1/tests/lang-test/swift/main.swift +5 -0
- ripex-0.3.1/tests/oversized_input.rs +87 -0
- ripex-0.3.1/tests/public_api.rs +147 -0
- ripex-0.3.1/tests/ripex_lang_test_repos.rs +333 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
name: Cargo Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
version:
|
|
10
|
+
description: "Version to publish (without the leading v)"
|
|
11
|
+
required: true
|
|
12
|
+
default: "0.3.1"
|
|
13
|
+
type: string
|
|
14
|
+
dry_run:
|
|
15
|
+
description: "Run dry-run only (do not upload to crates.io)"
|
|
16
|
+
required: false
|
|
17
|
+
default: false
|
|
18
|
+
type: boolean
|
|
19
|
+
|
|
20
|
+
permissions:
|
|
21
|
+
contents: read
|
|
22
|
+
|
|
23
|
+
env:
|
|
24
|
+
CARGO_TERM_COLOR: always
|
|
25
|
+
RELEASE_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.version || github.ref_name }}
|
|
26
|
+
|
|
27
|
+
concurrency:
|
|
28
|
+
group: cargo-release-${{ github.ref }}
|
|
29
|
+
cancel-in-progress: false
|
|
30
|
+
|
|
31
|
+
jobs:
|
|
32
|
+
validate:
|
|
33
|
+
name: Validate Cargo release version
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
timeout-minutes: 20
|
|
36
|
+
permissions:
|
|
37
|
+
contents: read
|
|
38
|
+
steps:
|
|
39
|
+
# actions/checkout v4.2.2
|
|
40
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
|
41
|
+
with:
|
|
42
|
+
fetch-depth: 0
|
|
43
|
+
|
|
44
|
+
- name: Install Rust 1.85.0
|
|
45
|
+
# dtolnay/rust-toolchain
|
|
46
|
+
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4
|
|
47
|
+
with:
|
|
48
|
+
toolchain: 1.85.0
|
|
49
|
+
components: clippy, rustfmt
|
|
50
|
+
|
|
51
|
+
- name: Validate version matches Cargo.toml
|
|
52
|
+
env:
|
|
53
|
+
RELEASE_VERSION_INPUT: ${{ env.RELEASE_VERSION }}
|
|
54
|
+
shell: bash
|
|
55
|
+
run: |
|
|
56
|
+
set -euo pipefail
|
|
57
|
+
expected="${RELEASE_VERSION_INPUT#v}"
|
|
58
|
+
[[ "$expected" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || {
|
|
59
|
+
echo "Release version must be a semantic X.Y.Z value: $expected" >&2
|
|
60
|
+
exit 1
|
|
61
|
+
}
|
|
62
|
+
package_version="$(
|
|
63
|
+
cargo metadata --locked --no-deps --format-version 1 |
|
|
64
|
+
python3 -c 'import json, sys; print(next(p["version"] for p in json.load(sys.stdin)["packages"] if p["name"] == "ripex"))'
|
|
65
|
+
)"
|
|
66
|
+
test "$package_version" = "$expected" || {
|
|
67
|
+
echo "Cargo package version $package_version does not match expected $expected" >&2
|
|
68
|
+
exit 1
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
- name: Check package verification dry-run
|
|
72
|
+
run: cargo publish --locked --dry-run
|
|
73
|
+
|
|
74
|
+
publish:
|
|
75
|
+
name: Publish to Crates.io
|
|
76
|
+
needs: validate
|
|
77
|
+
runs-on: ubuntu-latest
|
|
78
|
+
timeout-minutes: 15
|
|
79
|
+
permissions:
|
|
80
|
+
contents: read
|
|
81
|
+
steps:
|
|
82
|
+
# actions/checkout v4.2.2
|
|
83
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
|
84
|
+
with:
|
|
85
|
+
fetch-depth: 0
|
|
86
|
+
|
|
87
|
+
- name: Install Rust 1.85.0
|
|
88
|
+
# dtolnay/rust-toolchain
|
|
89
|
+
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4
|
|
90
|
+
with:
|
|
91
|
+
toolchain: 1.85.0
|
|
92
|
+
|
|
93
|
+
- name: Publish crate to crates.io
|
|
94
|
+
env:
|
|
95
|
+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
|
96
|
+
DRY_RUN: ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run || 'false' }}
|
|
97
|
+
shell: bash
|
|
98
|
+
run: |
|
|
99
|
+
set -euo pipefail
|
|
100
|
+
if [ "$DRY_RUN" = "true" ]; then
|
|
101
|
+
echo "Dry run requested: verifying cargo package without publishing..."
|
|
102
|
+
cargo publish --locked --dry-run
|
|
103
|
+
elif [ -n "${CARGO_REGISTRY_TOKEN:-}" ]; then
|
|
104
|
+
echo "Publishing ripex to crates.io..."
|
|
105
|
+
cargo publish --locked
|
|
106
|
+
else
|
|
107
|
+
echo "::notice::CARGO_REGISTRY_TOKEN secret is not set; skipping automated crates.io publication. Run 'cargo publish --locked' manually or configure the repository secret."
|
|
108
|
+
fi
|
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main, master]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
env:
|
|
13
|
+
CARGO_TERM_COLOR: always
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
test:
|
|
17
|
+
name: Build & Test
|
|
18
|
+
runs-on: ${{ matrix.os }}
|
|
19
|
+
timeout-minutes: 30
|
|
20
|
+
permissions:
|
|
21
|
+
contents: read
|
|
22
|
+
strategy:
|
|
23
|
+
fail-fast: false
|
|
24
|
+
matrix:
|
|
25
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
26
|
+
rust: [stable]
|
|
27
|
+
|
|
28
|
+
steps:
|
|
29
|
+
# actions/checkout v4.2.2
|
|
30
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
|
31
|
+
|
|
32
|
+
- name: Install Rust
|
|
33
|
+
# dtolnay/rust-toolchain stable
|
|
34
|
+
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4
|
|
35
|
+
with:
|
|
36
|
+
toolchain: ${{ matrix.rust }}
|
|
37
|
+
components: clippy, rustfmt
|
|
38
|
+
|
|
39
|
+
- name: Cache cargo registry
|
|
40
|
+
# actions/cache v4.2.0
|
|
41
|
+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
|
|
42
|
+
with:
|
|
43
|
+
path: ~/.cargo/registry
|
|
44
|
+
key: ${{ runner.os }}-${{ matrix.rust }}-cargo-registry-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
|
|
45
|
+
restore-keys: |
|
|
46
|
+
${{ runner.os }}-${{ matrix.rust }}-cargo-registry-
|
|
47
|
+
|
|
48
|
+
- name: Cache cargo build
|
|
49
|
+
# actions/cache v4.2.0
|
|
50
|
+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
|
|
51
|
+
with:
|
|
52
|
+
path: target
|
|
53
|
+
key: ${{ runner.os }}-${{ matrix.rust }}-cargo-build-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
|
|
54
|
+
restore-keys: |
|
|
55
|
+
${{ runner.os }}-${{ matrix.rust }}-cargo-build-
|
|
56
|
+
|
|
57
|
+
- name: Check formatting
|
|
58
|
+
run: cargo fmt --all -- --check
|
|
59
|
+
|
|
60
|
+
- name: Build
|
|
61
|
+
run: cargo build --locked --verbose
|
|
62
|
+
|
|
63
|
+
- name: Test all targets and features
|
|
64
|
+
run: cargo test --locked --all-targets --all-features --verbose
|
|
65
|
+
|
|
66
|
+
- name: Clippy
|
|
67
|
+
run: cargo clippy --locked --all-targets --all-features -- -D warnings
|
|
68
|
+
|
|
69
|
+
- name: Generate per-language evidence report
|
|
70
|
+
if: runner.os == 'Linux'
|
|
71
|
+
run: cargo run --locked --example evidence_report --all-features -- target/ripex-evidence.md
|
|
72
|
+
|
|
73
|
+
- name: Build (no-default-features, library only)
|
|
74
|
+
run: cargo build --locked --no-default-features --features "lang-all"
|
|
75
|
+
|
|
76
|
+
- name: Documentation
|
|
77
|
+
if: runner.os == 'Linux'
|
|
78
|
+
env:
|
|
79
|
+
RUSTDOCFLAGS: -D warnings
|
|
80
|
+
run: cargo doc --locked --no-deps --all-features
|
|
81
|
+
|
|
82
|
+
features:
|
|
83
|
+
name: Feature ${{ matrix.feature }}
|
|
84
|
+
runs-on: ubuntu-latest
|
|
85
|
+
timeout-minutes: 20
|
|
86
|
+
permissions:
|
|
87
|
+
contents: read
|
|
88
|
+
env:
|
|
89
|
+
RUSTFLAGS: -D warnings
|
|
90
|
+
strategy:
|
|
91
|
+
fail-fast: false
|
|
92
|
+
matrix:
|
|
93
|
+
feature:
|
|
94
|
+
- cli
|
|
95
|
+
- lang-all
|
|
96
|
+
- lang-c
|
|
97
|
+
- lang-cpp
|
|
98
|
+
- lang-csharp
|
|
99
|
+
- lang-go
|
|
100
|
+
- lang-js
|
|
101
|
+
- lang-python
|
|
102
|
+
- lang-rust
|
|
103
|
+
- serde
|
|
104
|
+
steps:
|
|
105
|
+
# actions/checkout v4.2.2
|
|
106
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
|
107
|
+
- name: Install Rust
|
|
108
|
+
# dtolnay/rust-toolchain stable
|
|
109
|
+
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4
|
|
110
|
+
with:
|
|
111
|
+
toolchain: stable
|
|
112
|
+
- name: Cache feature build
|
|
113
|
+
# actions/cache v4.2.0
|
|
114
|
+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
|
|
115
|
+
with:
|
|
116
|
+
path: target
|
|
117
|
+
key: ${{ runner.os }}-${{ matrix.feature }}-cargo-build-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
|
|
118
|
+
restore-keys: |
|
|
119
|
+
${{ runner.os }}-${{ matrix.feature }}-cargo-build-
|
|
120
|
+
- name: Check isolated feature
|
|
121
|
+
run: cargo check --locked --no-default-features --features "${{ matrix.feature }}"
|
|
122
|
+
- name: Run isolated integration tests
|
|
123
|
+
# --tests runs integration targets; feature-gated language tests skip unavailable modules.
|
|
124
|
+
run: cargo test --locked --no-default-features --features "${{ matrix.feature }}" --tests
|
|
125
|
+
|
|
126
|
+
minimal:
|
|
127
|
+
name: Minimal library
|
|
128
|
+
runs-on: ubuntu-latest
|
|
129
|
+
timeout-minutes: 15
|
|
130
|
+
permissions:
|
|
131
|
+
contents: read
|
|
132
|
+
env:
|
|
133
|
+
RUSTFLAGS: -D warnings
|
|
134
|
+
steps:
|
|
135
|
+
# actions/checkout v4.2.2
|
|
136
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
|
137
|
+
- name: Install Rust
|
|
138
|
+
# dtolnay/rust-toolchain stable
|
|
139
|
+
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4
|
|
140
|
+
with:
|
|
141
|
+
toolchain: stable
|
|
142
|
+
- run: cargo check --locked --no-default-features --lib
|
|
143
|
+
|
|
144
|
+
compiler-conformance:
|
|
145
|
+
name: Compiler conformance corpus
|
|
146
|
+
runs-on: ubuntu-latest
|
|
147
|
+
timeout-minutes: 30
|
|
148
|
+
permissions:
|
|
149
|
+
contents: read
|
|
150
|
+
steps:
|
|
151
|
+
# actions/checkout v4.2.2
|
|
152
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
|
153
|
+
- name: Install Rust
|
|
154
|
+
# dtolnay/rust-toolchain stable
|
|
155
|
+
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4
|
|
156
|
+
with:
|
|
157
|
+
toolchain: stable
|
|
158
|
+
- name: Install Go
|
|
159
|
+
# actions/setup-go v5.3.0
|
|
160
|
+
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff
|
|
161
|
+
with:
|
|
162
|
+
go-version: stable
|
|
163
|
+
- name: Install Node.js
|
|
164
|
+
# actions/setup-node v4.2.0
|
|
165
|
+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
|
166
|
+
with:
|
|
167
|
+
node-version: 22
|
|
168
|
+
- name: Install Python
|
|
169
|
+
# actions/setup-python v5.4.0
|
|
170
|
+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
|
|
171
|
+
with:
|
|
172
|
+
python-version: '3.12'
|
|
173
|
+
- name: Install latest .NET
|
|
174
|
+
# actions/setup-dotnet v4.3.0
|
|
175
|
+
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9
|
|
176
|
+
with:
|
|
177
|
+
dotnet-version: '8.0.x'
|
|
178
|
+
|
|
179
|
+
- name: Install language analyzers
|
|
180
|
+
run: |
|
|
181
|
+
npm ci --prefix tests/lang-test/javascript
|
|
182
|
+
python -m pip install mypy
|
|
183
|
+
|
|
184
|
+
- name: Build ripex
|
|
185
|
+
run: cargo build --locked --all-features
|
|
186
|
+
|
|
187
|
+
- name: Check C17 corpus
|
|
188
|
+
run: target/debug/ripex check tests/lang-test/c --lang c --trusted-project
|
|
189
|
+
- name: Check C++20 corpus
|
|
190
|
+
run: target/debug/ripex check tests/lang-test/cpp --lang cpp --trusted-project
|
|
191
|
+
- name: Check C# project
|
|
192
|
+
run: target/debug/ripex check tests/lang-test/csharp --trusted-project
|
|
193
|
+
- name: Check Go project
|
|
194
|
+
run: target/debug/ripex check tests/lang-test/go --trusted-project
|
|
195
|
+
- name: Check JavaScript project
|
|
196
|
+
run: target/debug/ripex check tests/lang-test/javascript/src --lang javascript --trusted-project
|
|
197
|
+
- name: Check TypeScript project
|
|
198
|
+
run: target/debug/ripex check tests/lang-test/javascript/tsconfig.json --trusted-project
|
|
199
|
+
- name: Check strict Python project
|
|
200
|
+
run: target/debug/ripex check tests/lang-test/python/src --lang python --trusted-project
|
|
201
|
+
- name: Check Rust project
|
|
202
|
+
run: target/debug/ripex check tests/lang-test/rust --trusted-project
|
|
203
|
+
|
|
204
|
+
fuzz-replay:
|
|
205
|
+
name: Fuzz corpus replay (deterministic)
|
|
206
|
+
runs-on: ubuntu-latest
|
|
207
|
+
timeout-minutes: 15
|
|
208
|
+
permissions:
|
|
209
|
+
contents: read
|
|
210
|
+
steps:
|
|
211
|
+
# actions/checkout v4.2.2
|
|
212
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
|
213
|
+
- name: Install nightly Rust
|
|
214
|
+
# dtolnay/rust-toolchain nightly
|
|
215
|
+
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4
|
|
216
|
+
with:
|
|
217
|
+
toolchain: nightly
|
|
218
|
+
- name: Install latest cargo-fuzz
|
|
219
|
+
run: cargo +nightly install cargo-fuzz --version 0.13.2 --locked
|
|
220
|
+
- name: Replay committed fuzz seeds
|
|
221
|
+
working-directory: tests/fuzz
|
|
222
|
+
shell: bash
|
|
223
|
+
run: |
|
|
224
|
+
set -euo pipefail
|
|
225
|
+
if [[ ! -d corpus ]] || ! find corpus -type f -print -quit | grep -q .; then
|
|
226
|
+
echo "::notice::No committed fuzz seeds found; deterministic replay skipped."
|
|
227
|
+
exit 0
|
|
228
|
+
fi
|
|
229
|
+
for target in fuzz_all fuzz_js fuzz_python fuzz_go; do
|
|
230
|
+
corpus_dir="corpus/$target"
|
|
231
|
+
if [[ ! -d "$corpus_dir" ]]; then
|
|
232
|
+
echo "::error::Missing committed corpus directory: $corpus_dir"
|
|
233
|
+
exit 1
|
|
234
|
+
fi
|
|
235
|
+
echo "Replaying $target committed fuzz seeds"
|
|
236
|
+
CARGOFLAGS=--locked cargo +nightly fuzz run --fuzz-dir . "$target" -- -runs=1 -timeout=5 -rss_limit_mb=512 -max_len=4096
|
|
237
|
+
done
|
|
238
|
+
fuzz:
|
|
239
|
+
name: Fuzz (advisory crash / hang hunting)
|
|
240
|
+
needs: fuzz-replay
|
|
241
|
+
runs-on: ubuntu-latest
|
|
242
|
+
timeout-minutes: 15
|
|
243
|
+
# Randomized fuzzing is advisory and must not block ordinary PR validation.
|
|
244
|
+
continue-on-error: true
|
|
245
|
+
permissions:
|
|
246
|
+
contents: read
|
|
247
|
+
steps:
|
|
248
|
+
# actions/checkout v4.2.2
|
|
249
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
|
250
|
+
- name: Install nightly Rust
|
|
251
|
+
# dtolnay/rust-toolchain nightly
|
|
252
|
+
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4
|
|
253
|
+
with:
|
|
254
|
+
toolchain: nightly
|
|
255
|
+
- name: Install latest cargo-fuzz
|
|
256
|
+
run: cargo +nightly install cargo-fuzz --version 0.13.2 --locked
|
|
257
|
+
- name: Fuzz all parsers briefly
|
|
258
|
+
working-directory: tests/fuzz
|
|
259
|
+
shell: bash
|
|
260
|
+
run: |
|
|
261
|
+
# cargo-fuzz has no --locked flag; CARGOFLAGS locks its inner Cargo invocation.
|
|
262
|
+
CARGOFLAGS=--locked cargo +nightly fuzz run --fuzz-dir . fuzz_all -- -max_total_time=60 -timeout=5 -rss_limit_mb=512 -max_len=4096
|
|
263
|
+
node-bindings:
|
|
264
|
+
name: Node bindings (${{ matrix.target }})
|
|
265
|
+
runs-on: ${{ matrix.os }}
|
|
266
|
+
timeout-minutes: 45
|
|
267
|
+
permissions:
|
|
268
|
+
contents: read
|
|
269
|
+
strategy:
|
|
270
|
+
fail-fast: false
|
|
271
|
+
matrix:
|
|
272
|
+
include:
|
|
273
|
+
- os: ubuntu-latest
|
|
274
|
+
target: x86_64-unknown-linux-gnu
|
|
275
|
+
binary: ripex.linux-x64-gnu.node
|
|
276
|
+
cross: "0"
|
|
277
|
+
runtime: true
|
|
278
|
+
- os: ubuntu-latest
|
|
279
|
+
target: aarch64-unknown-linux-gnu
|
|
280
|
+
binary: ripex.linux-arm64-gnu.node
|
|
281
|
+
cross: "1"
|
|
282
|
+
runtime: false
|
|
283
|
+
- os: macos-14
|
|
284
|
+
target: x86_64-apple-darwin
|
|
285
|
+
binary: ripex.darwin-x64.node
|
|
286
|
+
cross: "0"
|
|
287
|
+
runtime: false
|
|
288
|
+
- os: macos-14
|
|
289
|
+
target: aarch64-apple-darwin
|
|
290
|
+
binary: ripex.darwin-arm64.node
|
|
291
|
+
cross: "0"
|
|
292
|
+
runtime: true
|
|
293
|
+
- os: windows-latest
|
|
294
|
+
target: x86_64-pc-windows-msvc
|
|
295
|
+
binary: ripex.win32-x64-msvc.node
|
|
296
|
+
cross: "0"
|
|
297
|
+
runtime: true
|
|
298
|
+
|
|
299
|
+
steps:
|
|
300
|
+
# actions/checkout v4.2.2
|
|
301
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
|
302
|
+
- name: Install latest Node.js
|
|
303
|
+
# actions/setup-node v4.2.0
|
|
304
|
+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
|
305
|
+
with:
|
|
306
|
+
node-version: 22
|
|
307
|
+
|
|
308
|
+
- name: Install latest pnpm
|
|
309
|
+
run: npm install --global pnpm@10.28.2
|
|
310
|
+
|
|
311
|
+
- name: Install latest Bun
|
|
312
|
+
run: npm install --global bun@1.3.14
|
|
313
|
+
- name: Install Rust 1.85.0 and target
|
|
314
|
+
# dtolnay/rust-toolchain
|
|
315
|
+
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4
|
|
316
|
+
with:
|
|
317
|
+
toolchain: 1.85.0
|
|
318
|
+
target: ${{ matrix.target }}
|
|
319
|
+
|
|
320
|
+
- name: Install Node binding dependencies
|
|
321
|
+
working-directory: bindings/node
|
|
322
|
+
run: pnpm install --frozen-lockfile --ignore-scripts
|
|
323
|
+
- name: Install aarch64 cross-compiler
|
|
324
|
+
if: matrix.target == 'aarch64-unknown-linux-gnu'
|
|
325
|
+
run: |
|
|
326
|
+
sudo apt-get update
|
|
327
|
+
sudo apt-get install -y gcc-aarch64-linux-gnu
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
- name: Build Node binding
|
|
331
|
+
working-directory: bindings/node
|
|
332
|
+
env:
|
|
333
|
+
NAPI_TARGET: ${{ matrix.target }}
|
|
334
|
+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
|
|
335
|
+
run: npm run build:release
|
|
336
|
+
|
|
337
|
+
- name: Verify target binary and package metadata
|
|
338
|
+
working-directory: bindings/node
|
|
339
|
+
env:
|
|
340
|
+
EXPECTED_BINARY: ${{ matrix.binary }}
|
|
341
|
+
EXPECTED_TARGET: ${{ matrix.target }}
|
|
342
|
+
shell: bash
|
|
343
|
+
run: |
|
|
344
|
+
set -euo pipefail
|
|
345
|
+
node - "$EXPECTED_BINARY" "$EXPECTED_TARGET" <<'NODE'
|
|
346
|
+
const fs = require('node:fs');
|
|
347
|
+
const binary = process.argv[2];
|
|
348
|
+
const target = process.argv[3];
|
|
349
|
+
const binaries = fs.readdirSync('.')
|
|
350
|
+
.filter((entry) => entry.endsWith('.node'))
|
|
351
|
+
.filter((entry) => fs.statSync(entry).isFile())
|
|
352
|
+
.sort();
|
|
353
|
+
if (binaries.length !== 1 || binaries[0] !== binary) {
|
|
354
|
+
throw new Error(`expected exactly ${binary}, found ${binaries.join(', ')}`);
|
|
355
|
+
}
|
|
356
|
+
const metadata = JSON.parse(fs.readFileSync('package.json', 'utf8'));
|
|
357
|
+
const targets = metadata.napi?.targets;
|
|
358
|
+
if (!Array.isArray(targets) || targets.length !== 5 || !targets.includes(target)) {
|
|
359
|
+
throw new Error(`package.json does not declare target ${target}`);
|
|
360
|
+
}
|
|
361
|
+
if (metadata.scripts?.postinstall) {
|
|
362
|
+
throw new Error('postinstall network/download hooks are forbidden');
|
|
363
|
+
}
|
|
364
|
+
NODE
|
|
365
|
+
|
|
366
|
+
- name: Run native Node binding tests
|
|
367
|
+
if: matrix.runtime == true
|
|
368
|
+
working-directory: bindings/node
|
|
369
|
+
run: npm test
|
|
370
|
+
|
|
371
|
+
- name: Run Bun native smoke test
|
|
372
|
+
if: matrix.runtime == true
|
|
373
|
+
working-directory: bindings/node
|
|
374
|
+
run: bun test test/index.bun.test.mjs
|
|
375
|
+
- name: Check public TypeScript declarations
|
|
376
|
+
if: matrix.runtime == true
|
|
377
|
+
working-directory: bindings/node
|
|
378
|
+
run: npm run test:types
|
|
379
|
+
|
|
380
|
+
- name: Check package contents
|
|
381
|
+
if: matrix.runtime == true
|
|
382
|
+
working-directory: bindings/node
|
|
383
|
+
run: npm run pack:dry
|
|
384
|
+
|
|
385
|
+
- name: Upload Node binding artifact
|
|
386
|
+
# actions/upload-artifact v4.6.0
|
|
387
|
+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
|
388
|
+
with:
|
|
389
|
+
name: node-bindings-${{ matrix.target }}
|
|
390
|
+
path: |
|
|
391
|
+
bindings/node/${{ matrix.binary }}
|
|
392
|
+
bindings/node/index.cjs
|
|
393
|
+
bindings/node/index.js
|
|
394
|
+
bindings/node/index.d.ts
|
|
395
|
+
if-no-files-found: error
|
|
396
|
+
retention-days: 7
|
|
397
|
+
|
|
398
|
+
python-bindings:
|
|
399
|
+
name: Python bindings (${{ matrix.os }})
|
|
400
|
+
runs-on: ${{ matrix.os }}
|
|
401
|
+
timeout-minutes: 30
|
|
402
|
+
permissions:
|
|
403
|
+
contents: read
|
|
404
|
+
strategy:
|
|
405
|
+
fail-fast: false
|
|
406
|
+
matrix:
|
|
407
|
+
os: [ubuntu-latest, macos-14, windows-latest]
|
|
408
|
+
steps:
|
|
409
|
+
# actions/checkout v4.2.2
|
|
410
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
|
411
|
+
|
|
412
|
+
- name: Install Rust 1.85.0
|
|
413
|
+
# dtolnay/rust-toolchain
|
|
414
|
+
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4
|
|
415
|
+
with:
|
|
416
|
+
toolchain: 1.85.0
|
|
417
|
+
components: clippy, rustfmt
|
|
418
|
+
|
|
419
|
+
- name: Install Python 3.12
|
|
420
|
+
# actions/setup-python v5.4.0
|
|
421
|
+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
|
|
422
|
+
with:
|
|
423
|
+
python-version: '3.12'
|
|
424
|
+
|
|
425
|
+
- name: Install Python build and test dependencies
|
|
426
|
+
run: |
|
|
427
|
+
python -m pip install --upgrade pip
|
|
428
|
+
python -m pip install "maturin>=1.5,<2.0" pytest pytest-asyncio mypy
|
|
429
|
+
|
|
430
|
+
- name: Build and install Python bindings
|
|
431
|
+
run: python -m pip install -e bindings/python
|
|
432
|
+
|
|
433
|
+
- name: Run pytest test suite
|
|
434
|
+
run: pytest -v bindings/python/tests
|
|
435
|
+
|
|
436
|
+
- name: Check typing with mypy
|
|
437
|
+
run: mypy --strict bindings/python/python/ripex bindings/python/tests
|