- 
                Notifications
    
You must be signed in to change notification settings  - Fork 42
 
Feat/new compiler #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            shreyas-londhe
  wants to merge
  144
  commits into
  main
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
feat/new-compiler
  
      
      
   
  
    
  
  
  
 
  
      
    base: main
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
      
        
          +162,078
        
        
          −25,210
        
        
          
        
      
    
  
  
     Open
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            144 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      e861888
              
                fix: 3 char issue
              
              
                shreyas-londhe 02150d4
              
                feat: v2 fresh start
              
              
                shreyas-londhe 6ec7675
              
                feat: remove epsilon states (wip)
              
              
                shreyas-londhe e309004
              
                fix: epsilon-nfa -> nfa
              
              
                shreyas-londhe 6667e88
              
                feat: circom codegen
              
              
                shreyas-londhe 7613e48
              
                fix: conditional capture group logic
              
              
                shreyas-londhe a61a224
              
                feat: added substring extraction logic
              
              
                shreyas-londhe 09c7cd8
              
                feat: basic case working
              
              
                shreyas-londhe 499db3e
              
                noir compiler for regex matching (no substring capture
              
              
                jp4g f45751c
              
                feat: basic compiler functions (untested)
              
              
                shreyas-londhe f755d92
              
                update to work with bin and new compiler
              
              
                jp4g 9bb586f
              
                split functionality, add packed capture group data to lut
              
              
                jp4g 2901ec1
              
                fix: capture group logic
              
              
                shreyas-londhe 7930a41
              
                feat: added function to generate inputs for circuit
              
              
                shreyas-londhe 20d465a
              
                feat: basic e2e working
              
              
                shreyas-londhe 8a24437
              
                feat: added wasm functions
              
              
                shreyas-londhe 2121a41
              
                feat: minor changes
              
              
                shreyas-londhe 20ee1d3
              
                feat: added sample circom circuits
              
              
                shreyas-londhe d9d839b
              
                merge
              
              
                jp4g 0738447
              
                input gen works for non-capture
              
              
                jp4g 7f7a6e9
              
                feat: improve epsilon removal
              
              
                shreyas-londhe e39ea6c
              
                optimized substring capture single case
              
              
                jp4g 90c2027
              
                common utilities moved to common
              
              
                jp4g 5e1d6cb
              
                codegen for capture groups
              
              
                jp4g 29ab2b6
              
                codegen works with non-captures and captures
              
              
                jp4g 0735934
              
                constrain capture start end masks
              
              
                jp4g 49573cf
              
                fix: epsilon removal
              
              
                shreyas-londhe 3983096
              
                Merge branch 'feat/new-compiler' into feat/new-compiler-noir
              
              
                jp4g c7cc953
              
                updated regex compiler
              
              
                jp4g 65dc44c
              
                feat: modified wasm functions
              
              
                shreyas-londhe 209766d
              
                feat: improved error handling
              
              
                shreyas-londhe 71143b0
              
                feat: tests for body_hash regex
              
              
                shreyas-londhe fd59f9c
              
                constrain packed value decomposition
              
              
                jp4g da02954
              
                check_accept_state now ensures that traversal path length is equal to…
              
              
                jp4g 8318a35
              
                remove unused is_capture_start/ is_capture_end in capture_substring
              
              
                jp4g 1d7f2ab
              
                build_is_capture will now constrain is_capture to be 1
              
              
                jp4g 81e83e2
              
                add check that substring_from_mask start index = 1 and start index - …
              
              
                jp4g 88caab5
              
                also add check to end index mask in build_substring
              
              
                jp4g 3767f9a
              
                revamp directory structure
              
              
                jp4g bd9a43c
              
                merge
              
              
                jp4g 7f34356
              
                add new templates
              
              
                jp4g 8464c8b
              
                add max_match_length functionality
              
              
                jp4g 41fcdc2
              
                add separate noir inputs + hook up to wasm
              
              
                jp4g 0ee3f10
              
                some comments
              
              
                jp4g d3203fa
              
                Merge pull request #91 from zkemail/feat/new-compiler-noir
              
              
                shreyas-londhe aa3be01
              
                feat: refactor and writing apis
              
              
                shreyas-londhe f37bad1
              
                Update Cargo.toml
              
              
                Bisht13 f076a61
              
                Update Cargo.toml
              
              
                Bisht13 34246b0
              
                Update Cargo.toml
              
              
                Bisht13 5d1c7a8
              
                feat: minor changes
              
              
                shreyas-londhe cc91720
              
                fix: remove custom name for noir regex matcher
              
              
                shreyas-londhe ebc6a2f
              
                feat: added detailed readme for compiler
              
              
                shreyas-londhe 54b1884
              
                chore: minor changes
              
              
                shreyas-londhe 3cb1fa9
              
                chore: minor changes
              
              
                shreyas-londhe 66961ed
              
                fix: invalid __select_subarray
              
              
                shreyas-londhe ac31879
              
                fix: invalid capture group index
              
              
                shreyas-londhe a7b45f7
              
                fix: minor change
              
              
                shreyas-londhe c7e3ace
              
                fix: coinciding capture groups (builder)
              
              
                shreyas-londhe ced8ba3
              
                fix: added capture info to graph
              
              
                shreyas-londhe d04c6cf
              
                fix: bugs in noir utils
              
              
                shreyas-londhe 03f286c
              
                fix: fixed codegen
              
              
                shreyas-londhe 0840458
              
                minor change
              
              
                shreyas-londhe b54cd29
              
                feat: tested succinct regex
              
              
                shreyas-londhe 22163b2
              
                fix: improved handling of start states
              
              
                shreyas-londhe 28d2d13
              
                feat: added regex.nr gen script
              
              
                shreyas-londhe acdc2c1
              
                feat: added tests for noir
              
              
                shreyas-londhe 1ac9242
              
                fix [noir]: max key len calc
              
              
                shreyas-londhe a554050
              
                [compiler] fix: minor fixes
              
              
                shreyas-londhe 2c84b6e
              
                [compiler] chore: code refactor
              
              
                shreyas-londhe 1a8bee2
              
                [compiler] fix: separated intermediate NFA from final NFA in build pr…
              
              
                shreyas-londhe 6bf372a
              
                [compiler] fix: added detailed error handling
              
              
                shreyas-londhe 6384e23
              
                fix: circom traversal linking check
              
              
                shreyas-londhe 20d0217
              
                fix: using regex_helpers locally
              
              
                shreyas-londhe 1c4698f
              
                chore: upgraded npm version with new body_hash_regex.circom
              
              
                BornPsych 95900d7
              
                chore: added additional normailzation to validation check in template…
              
              
                BornPsych 9e82723
              
                chore: convert PascalCase from all other cases
              
              
                BornPsych 896ea18
              
                Merge pull request #94 from zkemail/fix/template-name-normalization
              
              
                DimiDumo 6d8df0e
              
                chore: made regex helper path absolute
              
              
                BornPsych d479713
              
                Merge pull request #95 from zkemail/fix/code-generation-circom
              
              
                DimiDumo 1654c2c
              
                fix: pascal case string modification
              
              
                BornPsych 00d72a7
              
                Merge pull request #96 from zkemail/fix/config-validate
              
              
                DimiDumo c4d8486
              
                fix: circom version and upgraded npm version
              
              
                BornPsych ee586f3
              
                Merge pull request #97 from zkemail/fix/circom-version
              
              
                BornPsych 06fe32b
              
                fix: tests passing now, updated circuit library
              
              
                BornPsych 850ecc3
              
                Merge pull request #101 from zkemail/fix/updated-circuit-lib
              
              
                BornPsych aa17277
              
                fix: relative position of capture grp start indices
              
              
                BornPsych f72c86f
              
                chore: updated npm dependency
              
              
                BornPsych ff68784
              
                chore: added dev dep to pass test for noir
              
              
                BornPsych 776a578
              
                chore: added command to publish alpha version
              
              
                BornPsych 722940c
              
                chore: added scope for npm build
              
              
                BornPsych 87e692a
              
                chore: removed commented code
              
              
                BornPsych 72223a5
              
                chore: circom file formatting
              
              
                BornPsych 47abcf1
              
                Merge pull request #102 from zkemail/fix/capture-grp-start-index
              
              
                shreyas-londhe f81f4ac
              
                feat: add TypeScript infrastructure for scripts migration
              
              
                rutefig fe35905
              
                feat: add core utility types and logger module
              
              
                rutefig 6b9ce32
              
                feat: add string utilities for regex and text processing
              
              
                rutefig 3693751
              
                feat: add file operations utilities with async support
              
              
                rutefig ff60942
              
                feat: add subprocess utilities with performance optimizations
              
              
                rutefig a0b857a
              
                feat: add utility module index exports
              
              
                rutefig b4ba7fd
              
                test: add comprehensive unit tests for utility modules
              
              
                rutefig 0077d3b
              
                feat: migrate circom gen_regex.py to TypeScript
              
              
                rutefig 43979e0
              
                feat: migrate noir gen_regex.py to TypeScript
              
              
                rutefig aa4065d
              
                feat: migrate noir gen_inputs.py to TypeScript
              
              
                rutefig ce205ca
              
                test: add integration tests for migrated scripts
              
              
                rutefig 26deb97
              
                docs: add migration documentation and README
              
              
                rutefig fea567c
              
                chore: update .gitignore for TypeScript build artifacts
              
              
                rutefig c5bf11f
              
                feat: finalize Python to TypeScript migration with build system impro…
              
              
                rutefig 18fac32
              
                fix: improve TypeScript script performance and reliability
              
              
                rutefig 37c64fe
              
                chore: update yarn.lock dependencies
              
              
                rutefig 86c8bac
              
                docs: remove old MIGRATION.md file
              
              
                rutefig b758234
              
                fix: resolve TypeScript compilation errors and deprecated Node.js APIs
              
              
                rutefig 81a07a9
              
                chore: remove old python scripts
              
              
                rutefig d0ddca3
              
                feat: migrate ZK-Regex project from mixed Yarn/Bun to Bun-only
              
              
                rutefig 1d5a5c4
              
                docs: update scripts README for Bun migration
              
              
                rutefig a0ebfd4
              
                chore: remove legacy yarn lock files
              
              
                rutefig 34e2ad7
              
                feat: complete Bun migration for entire project including Circom tests
              
              
                rutefig 811fd46
              
                docs: fix Circom installation instructions to match official docs
              
              
                rutefig 4a472b2
              
                feat: migrate JavaScript files to TypeScript
              
              
                rutefig 777226f
              
                feat: add automatic template generation via pre-push hook
              
              
                rutefig abfe922
              
                fix: error handling in gen circuit
              
              
                BornPsych 35014c2
              
                Merge pull request #107 from zkemail/fix/error-handling
              
              
                BornPsych 97ddff0
              
                feat: restore Noir circuit tests and add manual test guidelines
              
              
                rutefig 0f79735
              
                chore: added github actions for the test
              
              
                BornPsych d18c9e9
              
                Merge pull request #106 from zkemail/rutefig/reg-531-move-python-scri…
              
              
                BornPsych 29f8cc8
              
                chore: added license file to repo
              
              
                BornPsych 8c50a00
              
                Merge branch 'main' into feat/new-compiler
              
              
                BornPsych 3dd1eb5
              
                chore: ran cargo clippy fix
              
              
                BornPsych 298b3f7
              
                fix: force new build process
              
              
                BornPsych c1ac7ad
              
                fix: changes in pre-push file for preserving tests
              
              
                BornPsych a8a670c
              
                chore: regenerate templates with updated import paths
              
              
                BornPsych 5124dff
              
                fix: added code to preserve mannual code
              
              
                BornPsych fa0b546
              
                chore: increased the test timeout for CI tests
              
              
                BornPsych 7de226d
              
                chore: removed the unsupported bun deps
              
              
                BornPsych 9fc345a
              
                fix: CI for body hash test
              
              
                BornPsych a54aced
              
                fix: CI error due to wrong version of bun
              
              
                BornPsych 2d5cd24
              
                fix: add root bunfig.toml with 30s timeout for all tests
              
              
                BornPsych 09b8a86
              
                fix: pin Bun version to 1.2.22 in CI workflow
              
              
                BornPsych 89c9442
              
                fix: rust compilation errors - unstable expressions
              
              
                rutefig 181ddd8
              
                chore: convert bare capture groups on private patterns into non captu…
              
              
                rutefig 12b8a6f
              
                fix: doctest trying to access to private function
              
              
                rutefig bb530c5
              
                chore: added test to check if gen_from_decomposed converts capture gr…
              
              
                rutefig faeabb4
              
                fix: properly handle escaped parens and character classes in capture …
              
              
                rutefig dfe8085
              
                fix: convert named captures to non-capturing in private patterns
              
              
                rutefig 3d37c31
              
                Merge pull request #109 from zkemail/rutefig/reg-574-fix-prevent-capt…
              
              
                rutefig File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
          The table of contents is too big for display.
        
      Diff view
Diff view
There are no files selected for viewing
            Binary file not shown.
          
    This file was deleted.
      
      Oops, something went wrong.
      
    
  This file was deleted.
      
      Oops, something went wrong.
      
    
  This file was deleted.
      
      Oops, something went wrong.
      
    
  This file was deleted.
      
      Oops, something went wrong.
      
    
  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| name: Test | ||
| 
     | 
||
| on: | ||
| push: | ||
| branches: [ "**" ] | ||
| pull_request: | ||
| branches: [ "main", "master" ] | ||
| 
     | 
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| 
     | 
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| 
     | 
||
| - name: Setup Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| toolchain: stable | ||
| 
     | 
||
| - name: Cache Cargo | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: | | ||
| ~/.cargo/bin/ | ||
| ~/.cargo/registry/index/ | ||
| ~/.cargo/registry/cache/ | ||
| ~/.cargo/git/db/ | ||
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-cargo- | ||
| 
     | 
||
| - name: Install wasm-pack | ||
| run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | ||
| 
     | 
||
| - name: Install Circom | ||
| run: | | ||
| # Check if circom 2.1.9 is already installed | ||
| if command -v circom &> /dev/null && circom --version | grep -q "2.1.9"; then | ||
| echo "Circom 2.1.9 already installed" | ||
| circom --version | ||
| else | ||
| echo "Installing Circom 2.1.9 from source" | ||
| git clone https://github.com/iden3/circom.git /tmp/circom | ||
| cd /tmp/circom | ||
| git checkout v2.1.9 | ||
| cargo build --release | ||
| cargo install --path circom | ||
| circom --version | ||
| fi | ||
| 
     | 
||
| - name: Setup Bun | ||
| uses: oven-sh/setup-bun@v1 | ||
| with: | ||
| bun-version: "1.2.22" | ||
| 
     | 
||
| - name: Install dependencies | ||
| run: bun install | ||
| 
     | 
||
| - name: Run tests | ||
| run: bun test | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,114 +1,18 @@ | ||
| # Logs | ||
| logs | ||
| *.log | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
| lerna-debug.log* | ||
| 
     | 
||
| # Diagnostic reports (https://nodejs.org/api/report.html) | ||
| report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
| 
     | 
||
| # Runtime data | ||
| pids | ||
| *.pid | ||
| *.seed | ||
| *.pid.lock | ||
| 
     | 
||
| # Directory for instrumented libs generated by jscoverage/JSCover | ||
| lib-cov | ||
| 
     | 
||
| # Coverage directory used by tools like istanbul | ||
| coverage | ||
| *.lcov | ||
| 
     | 
||
| # nyc test coverage | ||
| .nyc_output | ||
| 
     | 
||
| # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
| .grunt | ||
| 
     | 
||
| # Bower dependency directory (https://bower.io/) | ||
| bower_components | ||
| 
     | 
||
| # node-waf configuration | ||
| .lock-wscript | ||
| 
     | 
||
| # Compiled binary addons (https://nodejs.org/api/addons.html) | ||
| build/Release | ||
| 
     | 
||
| # Dependency directories | ||
| node_modules/ | ||
| jspm_packages/ | ||
| 
     | 
||
| # Optional npm cache directory | ||
| .npm | ||
| 
     | 
||
| # Optional eslint cache | ||
| .eslintcache | ||
| 
     | 
||
| # Microbundle cache | ||
| .rpt2_cache/ | ||
| .rts2_cache_cjs/ | ||
| .rts2_cache_es/ | ||
| .rts2_cache_umd/ | ||
| 
     | 
||
| # Optional REPL history | ||
| .node_repl_history | ||
| 
     | 
||
| # Output of 'npm pack' | ||
| *.tgz | ||
| 
     | 
||
| # Yarn Integrity file | ||
| .yarn-integrity | ||
| 
     | 
||
| # dotenv environment variables file | ||
| .env | ||
| .env.test | ||
| 
     | 
||
| # parcel-bundler cache (https://parceljs.org/) | ||
| .cache | ||
| 
     | 
||
| # Next.js build output | ||
| .next | ||
| 
     | 
||
| # Nuxt.js build / generate output | ||
| .nuxt | ||
| dist | ||
| 
     | 
||
| # Gatsby files | ||
| .cache/ | ||
| # Comment in the public line in if your project uses Gatsby and *not* Next.js | ||
| # https://nextjs.org/blog/next-9-1#public-directory-support | ||
| # public | ||
| 
     | 
||
| # vuepress build output | ||
| .vuepress/dist | ||
| 
     | 
||
| # Serverless directories | ||
| .serverless/ | ||
| 
     | 
||
| # FuseBox cache | ||
| .fusebox/ | ||
| 
     | 
||
| # DynamoDB Local files | ||
| .dynamodb/ | ||
| 
     | 
||
| # TernJS port file | ||
| .tern-port | ||
| 
     | 
||
| .vscode | ||
| build/* | ||
| !build/.placeholder | ||
| 
     | 
||
| nfa.json | ||
| target | ||
| 
     | 
||
| Cargo.lock | ||
| 
     | 
||
| .DS_Store | ||
| packages/*/build | ||
| 
     | 
||
| package-lock.json | ||
| yarn.lock | ||
| 
     | 
||
| index.node | ||
| /compiler/pkg | ||
| /compiler/.yarn | ||
| 
     | 
||
| Prover.toml | ||
| prover.toml | ||
| inputs.txt | ||
| node_modules | ||
| 
     | 
||
| # TypeScript build artifacts | ||
| scripts/dist/ | ||
| **/scripts/*.js | ||
| **/scripts/*.d.ts | ||
| **/scripts/*.js.map | ||
| **/scripts/*.d.ts.map | ||
| 
     | 
||
| .claude | 
This file was deleted.
      
      Oops, something went wrong.
      
    
  
      
      Oops, something went wrong.
        
    
  
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update
actions/cacheto v4 for GitHub Actions compatibility.The
actions/cache@v3action is outdated per actionlint. Update to v4 to ensure compatibility with current GitHub Actions standards and to receive security updates.📝 Committable suggestion
🧰 Tools
🪛 actionlint (1.7.8)
23-23: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🤖 Prompt for AI Agents