alamin655 commited on
Commit
7ea9e86
2 Parent(s): d639351 8790f5f

Merge branch 'neon-mmd:rolling' into hf-rolling

Browse files
.github/workflows/docker.yml CHANGED
@@ -34,7 +34,7 @@ jobs:
34
  uses: docker/setup-buildx-action@v3
35
  # Set buildx cache
36
  - name: Cache register
37
- uses: actions/cache@v3
38
  with:
39
  path: /tmp/.buildx-cache
40
  key: buildx-cache
 
34
  uses: docker/setup-buildx-action@v3
35
  # Set buildx cache
36
  - name: Cache register
37
+ uses: actions/cache@v4
38
  with:
39
  path: /tmp/.buildx-cache
40
  key: buildx-cache
.github/workflows/release.yml ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Bump release version
2
+ on:
3
+ pull_request:
4
+ branches: [rolling]
5
+ types:
6
+ - closed
7
+
8
+ permissions:
9
+ contents: write
10
+ pull-requests: write
11
+ repository-projects: write
12
+
13
+ concurrency: production
14
+
15
+ jobs:
16
+ build:
17
+ name: bump tag version and release
18
+ if: github.event.pull_request.merged == true
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - name: Checkout code
22
+ uses: actions/checkout@v4
23
+ with:
24
+ ref: ${{ github.sha }}
25
+ fetch-depth: 0
26
+ - name: Bump version and push tag
27
+ id: version-bump
28
+ uses: hennejg/github-tag-action@v4.4.0
29
+ with:
30
+ github_token: ${{ secrets.GITHUB_TOKEN }}
31
+ release_branches: rolling
32
+ - name: create branch
33
+ uses: peterjgrainger/action-create-branch@v2.4.0
34
+ env:
35
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36
+ with:
37
+ branch: update-from-${{ github.sha }}
38
+ - name: update cargo.toml
39
+ run: |
40
+ appversion=$(echo "${{ steps.version-bump.outputs.new_tag }}" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
41
+ sed -i -e "s/^version = .*/version = \"$appversion\"/" Cargo.toml
42
+ - run: rustup toolchain install stable --profile minimal
43
+ - run: rustup update stable && rustup default stable
44
+ - name: regenerate cargo.lock
45
+ run: cargo generate-lockfile
46
+ - name: auto commit
47
+ uses: stefanzweifel/git-auto-commit-action@v5
48
+ with:
49
+ commit_message: "[skip ci] updating app version to ${{ steps.version-bump.outputs.new_tag }}"
50
+ branch: update-from-${{ github.sha }}
51
+ # create PR using GitHub CLI
52
+ - name: create PR with update info
53
+ id: create-pr
54
+ run: gh pr create --base rolling --head update-from-${{ github.sha }} --title 'Merge new update into rolling' --body 'Created by Github action'
55
+ env:
56
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57
+ # merge PR using GitHub CLI
58
+ - name: merge PR with update info
59
+ id: merge-pr
60
+ run: gh pr merge --admin --merge --subject 'Merge update info' --delete-branch
61
+ env:
62
+ GH_TOKEN: ${{ secrets.ADMIN_RIGHTS_TOKEN }}
63
+ - name: Create Release
64
+ uses: softprops/action-gh-release@v1
65
+ with:
66
+ token: ${{ secrets.GITHUB_TOKEN }}
67
+ generate_release_notes: true
68
+ name: ${{ steps.version-bump.outputs.new_tag }}
69
+ tag_name: ${{ steps.version-bump.outputs.new_tag }}
70
+ prerelease: false
71
+ env:
72
+ GITHUB_REPOSITORY: ${{ github.repository }}
Cargo.lock CHANGED
@@ -31,21 +31,20 @@ dependencies = [
31
  "futures-util",
32
  "log",
33
  "once_cell",
34
- "smallvec 1.11.2",
35
  ]
36
 
37
  [[package]]
38
  name = "actix-files"
39
- version = "0.6.2"
40
  source = "registry+https://github.com/rust-lang/crates.io-index"
41
- checksum = "d832782fac6ca7369a70c9ee9a20554623c5e51c76e190ad151780ebea1cf689"
42
  dependencies = [
43
  "actix-http",
44
  "actix-service",
45
  "actix-utils",
46
  "actix-web",
47
- "askama_escape",
48
- "bitflags 1.3.2",
49
  "bytes 1.5.0",
50
  "derive_more",
51
  "futures-core",
@@ -55,6 +54,7 @@ dependencies = [
55
  "mime_guess",
56
  "percent-encoding 2.3.1",
57
  "pin-project-lite",
 
58
  ]
59
 
60
  [[package]]
@@ -99,7 +99,7 @@ dependencies = [
99
  "pin-project-lite",
100
  "rand 0.8.5",
101
  "sha1",
102
- "smallvec 1.11.2",
103
  "tokio 1.35.1",
104
  "tokio-util",
105
  "tracing",
@@ -111,8 +111,8 @@ version = "0.2.4"
111
  source = "registry+https://github.com/rust-lang/crates.io-index"
112
  checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb"
113
  dependencies = [
114
- "quote 1.0.33",
115
- "syn 2.0.43",
116
  ]
117
 
118
  [[package]]
@@ -210,7 +210,7 @@ dependencies = [
210
  "serde",
211
  "serde_json",
212
  "serde_urlencoded 0.7.1",
213
- "smallvec 1.11.2",
214
  "socket2",
215
  "time 0.3.31",
216
  "url 2.5.0",
@@ -223,9 +223,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
223
  checksum = "eb1f50ebbb30eca122b188319a4398b3f7bb4a8cdf50ecfb73bfc6a3c3ce54f5"
224
  dependencies = [
225
  "actix-router",
226
- "proc-macro2 1.0.71",
227
- "quote 1.0.33",
228
- "syn 2.0.43",
229
  ]
230
 
231
  [[package]]
@@ -346,12 +346,6 @@ version = "0.7.4"
346
  source = "registry+https://github.com/rust-lang/crates.io-index"
347
  checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
348
 
349
- [[package]]
350
- name = "askama_escape"
351
- version = "0.10.3"
352
- source = "registry+https://github.com/rust-lang/crates.io-index"
353
- checksum = "619743e34b5ba4e9703bba34deac3427c72507c7159f5fd030aea8cac0cfe341"
354
-
355
  [[package]]
356
  name = "async-compression"
357
  version = "0.4.5"
@@ -378,9 +372,9 @@ version = "0.1.76"
378
  source = "registry+https://github.com/rust-lang/crates.io-index"
379
  checksum = "531b97fb4cd3dfdce92c35dedbfdc1f0b9d8091c8ca943d6dae340ef5012d514"
380
  dependencies = [
381
- "proc-macro2 1.0.71",
382
- "quote 1.0.33",
383
- "syn 2.0.43",
384
  ]
385
 
386
  [[package]]
@@ -744,8 +738,8 @@ version = "0.3.2"
744
  source = "registry+https://github.com/rust-lang/crates.io-index"
745
  checksum = "5e1e0fdd2e5d3041e530e1b21158aeeef8b5d0e306bc5c1e3d6cf0930d10e25a"
746
  dependencies = [
747
- "proc-macro2 1.0.71",
748
- "quote 1.0.33",
749
  "syn 1.0.109",
750
  ]
751
 
@@ -956,7 +950,7 @@ dependencies = [
956
  "dtoa-short",
957
  "itoa 1.0.10",
958
  "phf 0.11.2",
959
- "smallvec 1.11.2",
960
  ]
961
 
962
  [[package]]
@@ -969,7 +963,7 @@ dependencies = [
969
  "dtoa-short",
970
  "itoa 1.0.10",
971
  "phf 0.11.2",
972
- "smallvec 1.11.2",
973
  ]
974
 
975
  [[package]]
@@ -987,8 +981,8 @@ version = "0.6.1"
987
  source = "registry+https://github.com/rust-lang/crates.io-index"
988
  checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331"
989
  dependencies = [
990
- "quote 1.0.33",
991
- "syn 2.0.43",
992
  ]
993
 
994
  [[package]]
@@ -1026,8 +1020,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1026
  checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321"
1027
  dependencies = [
1028
  "convert_case",
1029
- "proc-macro2 1.0.71",
1030
- "quote 1.0.33",
1031
  "rustc_version 0.4.0",
1032
  "syn 1.0.109",
1033
  ]
@@ -1100,12 +1094,22 @@ dependencies = [
1100
  "cfg-if 1.0.0",
1101
  ]
1102
 
 
 
 
 
 
 
 
 
 
1103
  [[package]]
1104
  name = "env_logger"
1105
- version = "0.10.1"
1106
  source = "registry+https://github.com/rust-lang/crates.io-index"
1107
- checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece"
1108
  dependencies = [
 
1109
  "log",
1110
  ]
1111
 
@@ -1170,8 +1174,8 @@ version = "0.1.8"
1170
  source = "registry+https://github.com/rust-lang/crates.io-index"
1171
  checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4"
1172
  dependencies = [
1173
- "proc-macro2 1.0.71",
1174
- "quote 1.0.33",
1175
  "syn 1.0.109",
1176
  "synstructure",
1177
  ]
@@ -1341,9 +1345,9 @@ version = "0.3.30"
1341
  source = "registry+https://github.com/rust-lang/crates.io-index"
1342
  checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
1343
  dependencies = [
1344
- "proc-macro2 1.0.71",
1345
- "quote 1.0.33",
1346
- "syn 2.0.43",
1347
  ]
1348
 
1349
  [[package]]
@@ -1448,7 +1452,7 @@ dependencies = [
1448
  "parking_lot 0.12.1",
1449
  "quanta",
1450
  "rand 0.8.5",
1451
- "smallvec 1.11.2",
1452
  ]
1453
 
1454
  [[package]]
@@ -1554,8 +1558,8 @@ dependencies = [
1554
  "log",
1555
  "mac",
1556
  "markup5ever 0.11.0",
1557
- "proc-macro2 1.0.71",
1558
- "quote 1.0.33",
1559
  "syn 1.0.109",
1560
  ]
1561
 
@@ -1860,9 +1864,9 @@ dependencies = [
1860
 
1861
  [[package]]
1862
  name = "lightningcss"
1863
- version = "1.0.0-alpha.51"
1864
  source = "registry+https://github.com/rust-lang/crates.io-index"
1865
- checksum = "99d6ad516c08b24c246b339159dc2ee2144c012e8ebdf4db4bddefb8734b2b69"
1866
  dependencies = [
1867
  "ahash 0.7.7",
1868
  "bitflags 2.4.1",
@@ -1875,7 +1879,7 @@ dependencies = [
1875
  "parcel_selectors",
1876
  "paste",
1877
  "pathdiff",
1878
- "smallvec 1.11.2",
1879
  ]
1880
 
1881
  [[package]]
@@ -2016,8 +2020,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
2016
  checksum = "0be95d66c3024ffce639216058e5bae17a83ecaf266ffc6e4d060ad447c9eed2"
2017
  dependencies = [
2018
  "proc-macro-error",
2019
- "proc-macro2 1.0.71",
2020
- "quote 1.0.33",
2021
  "syn 1.0.109",
2022
  ]
2023
 
@@ -2077,7 +2081,7 @@ dependencies = [
2077
  "crossbeam-utils 0.8.18",
2078
  "dashmap",
2079
  "skeptic",
2080
- "smallvec 1.11.2",
2081
  "tagptr",
2082
  "triomphe",
2083
  ]
@@ -2301,9 +2305,9 @@ version = "0.1.1"
2301
  source = "registry+https://github.com/rust-lang/crates.io-index"
2302
  checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
2303
  dependencies = [
2304
- "proc-macro2 1.0.71",
2305
- "quote 1.0.33",
2306
- "syn 2.0.43",
2307
  ]
2308
 
2309
  [[package]]
@@ -2337,7 +2341,7 @@ dependencies = [
2337
  "phf 0.10.1",
2338
  "phf_codegen 0.10.0",
2339
  "precomputed-hash",
2340
- "smallvec 1.11.2",
2341
  ]
2342
 
2343
  [[package]]
@@ -2385,7 +2389,7 @@ dependencies = [
2385
  "cfg-if 1.0.0",
2386
  "libc",
2387
  "redox_syscall 0.4.1",
2388
- "smallvec 1.11.2",
2389
  "windows-targets 0.48.5",
2390
  ]
2391
 
@@ -2512,9 +2516,9 @@ checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b"
2512
  dependencies = [
2513
  "phf_generator 0.11.2",
2514
  "phf_shared 0.11.2",
2515
- "proc-macro2 1.0.71",
2516
- "quote 1.0.33",
2517
- "syn 2.0.43",
2518
  ]
2519
 
2520
  [[package]]
@@ -2559,9 +2563,9 @@ version = "1.1.3"
2559
  source = "registry+https://github.com/rust-lang/crates.io-index"
2560
  checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405"
2561
  dependencies = [
2562
- "proc-macro2 1.0.71",
2563
- "quote 1.0.33",
2564
- "syn 2.0.43",
2565
  ]
2566
 
2567
  [[package]]
@@ -2618,8 +2622,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
2618
  checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
2619
  dependencies = [
2620
  "proc-macro-error-attr",
2621
- "proc-macro2 1.0.71",
2622
- "quote 1.0.33",
2623
  "syn 1.0.109",
2624
  "version_check",
2625
  ]
@@ -2630,8 +2634,8 @@ version = "1.0.4"
2630
  source = "registry+https://github.com/rust-lang/crates.io-index"
2631
  checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
2632
  dependencies = [
2633
- "proc-macro2 1.0.71",
2634
- "quote 1.0.33",
2635
  "version_check",
2636
  ]
2637
 
@@ -2646,9 +2650,9 @@ dependencies = [
2646
 
2647
  [[package]]
2648
  name = "proc-macro2"
2649
- version = "1.0.71"
2650
  source = "registry+https://github.com/rust-lang/crates.io-index"
2651
- checksum = "75cb1540fadbd5b8fbccc4dddad2734eba435053f725621c070711a14bb5f4b8"
2652
  dependencies = [
2653
  "unicode-ident",
2654
  ]
@@ -2701,11 +2705,11 @@ dependencies = [
2701
 
2702
  [[package]]
2703
  name = "quote"
2704
- version = "1.0.33"
2705
  source = "registry+https://github.com/rust-lang/crates.io-index"
2706
- checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
2707
  dependencies = [
2708
- "proc-macro2 1.0.71",
2709
  ]
2710
 
2711
  [[package]]
@@ -3208,7 +3212,7 @@ dependencies = [
3208
  "phf_codegen 0.10.0",
3209
  "precomputed-hash",
3210
  "servo_arc",
3211
- "smallvec 1.11.2",
3212
  ]
3213
 
3214
  [[package]]
@@ -3237,22 +3241,22 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
3237
 
3238
  [[package]]
3239
  name = "serde"
3240
- version = "1.0.193"
3241
  source = "registry+https://github.com/rust-lang/crates.io-index"
3242
- checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89"
3243
  dependencies = [
3244
  "serde_derive",
3245
  ]
3246
 
3247
  [[package]]
3248
  name = "serde_derive"
3249
- version = "1.0.193"
3250
  source = "registry+https://github.com/rust-lang/crates.io-index"
3251
- checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3"
3252
  dependencies = [
3253
- "proc-macro2 1.0.71",
3254
- "quote 1.0.33",
3255
- "syn 2.0.43",
3256
  ]
3257
 
3258
  [[package]]
@@ -3366,9 +3370,9 @@ dependencies = [
3366
 
3367
  [[package]]
3368
  name = "smallvec"
3369
- version = "1.11.2"
3370
  source = "registry+https://github.com/rust-lang/crates.io-index"
3371
- checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970"
3372
  dependencies = [
3373
  "serde",
3374
  ]
@@ -3441,8 +3445,8 @@ checksum = "f0f45ed1b65bf9a4bf2f7b7dc59212d1926e9eaf00fa998988e420fd124467c6"
3441
  dependencies = [
3442
  "phf_generator 0.7.24",
3443
  "phf_shared 0.7.24",
3444
- "proc-macro2 1.0.71",
3445
- "quote 1.0.33",
3446
  "string_cache_shared",
3447
  ]
3448
 
@@ -3454,8 +3458,8 @@ checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988"
3454
  dependencies = [
3455
  "phf_generator 0.10.0",
3456
  "phf_shared 0.10.0",
3457
- "proc-macro2 1.0.71",
3458
- "quote 1.0.33",
3459
  ]
3460
 
3461
  [[package]]
@@ -3487,19 +3491,19 @@ version = "1.0.109"
3487
  source = "registry+https://github.com/rust-lang/crates.io-index"
3488
  checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
3489
  dependencies = [
3490
- "proc-macro2 1.0.71",
3491
- "quote 1.0.33",
3492
  "unicode-ident",
3493
  ]
3494
 
3495
  [[package]]
3496
  name = "syn"
3497
- version = "2.0.43"
3498
  source = "registry+https://github.com/rust-lang/crates.io-index"
3499
- checksum = "ee659fb5f3d355364e1f3e5bc10fb82068efbf824a1e9d1c9504244a6469ad53"
3500
  dependencies = [
3501
- "proc-macro2 1.0.71",
3502
- "quote 1.0.33",
3503
  "unicode-ident",
3504
  ]
3505
 
@@ -3509,8 +3513,8 @@ version = "0.12.6"
3509
  source = "registry+https://github.com/rust-lang/crates.io-index"
3510
  checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f"
3511
  dependencies = [
3512
- "proc-macro2 1.0.71",
3513
- "quote 1.0.33",
3514
  "syn 1.0.109",
3515
  "unicode-xid 0.2.4",
3516
  ]
@@ -3733,9 +3737,9 @@ version = "2.2.0"
3733
  source = "registry+https://github.com/rust-lang/crates.io-index"
3734
  checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
3735
  dependencies = [
3736
- "proc-macro2 1.0.71",
3737
- "quote 1.0.33",
3738
- "syn 2.0.43",
3739
  ]
3740
 
3741
  [[package]]
@@ -4008,6 +4012,12 @@ dependencies = [
4008
  "rand 0.6.5",
4009
  ]
4010
 
 
 
 
 
 
 
4011
  [[package]]
4012
  name = "vcpkg"
4013
  version = "0.2.15"
@@ -4081,9 +4091,9 @@ dependencies = [
4081
  "bumpalo",
4082
  "log",
4083
  "once_cell",
4084
- "proc-macro2 1.0.71",
4085
- "quote 1.0.33",
4086
- "syn 2.0.43",
4087
  "wasm-bindgen-shared",
4088
  ]
4089
 
@@ -4105,7 +4115,7 @@ version = "0.2.89"
4105
  source = "registry+https://github.com/rust-lang/crates.io-index"
4106
  checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2"
4107
  dependencies = [
4108
- "quote 1.0.33",
4109
  "wasm-bindgen-macro-support",
4110
  ]
4111
 
@@ -4115,9 +4125,9 @@ version = "0.2.89"
4115
  source = "registry+https://github.com/rust-lang/crates.io-index"
4116
  checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283"
4117
  dependencies = [
4118
- "proc-macro2 1.0.71",
4119
- "quote 1.0.33",
4120
- "syn 2.0.43",
4121
  "wasm-bindgen-backend",
4122
  "wasm-bindgen-shared",
4123
  ]
@@ -4180,7 +4190,7 @@ dependencies = [
4180
  "scraper",
4181
  "serde",
4182
  "serde_json",
4183
- "smallvec 1.11.2",
4184
  "tempfile",
4185
  "tokio 1.35.1",
4186
  ]
@@ -4417,9 +4427,9 @@ version = "0.7.32"
4417
  source = "registry+https://github.com/rust-lang/crates.io-index"
4418
  checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
4419
  dependencies = [
4420
- "proc-macro2 1.0.71",
4421
- "quote 1.0.33",
4422
- "syn 2.0.43",
4423
  ]
4424
 
4425
  [[package]]
 
31
  "futures-util",
32
  "log",
33
  "once_cell",
34
+ "smallvec 1.13.1",
35
  ]
36
 
37
  [[package]]
38
  name = "actix-files"
39
+ version = "0.6.5"
40
  source = "registry+https://github.com/rust-lang/crates.io-index"
41
+ checksum = "bf0bdd6ff79de7c9a021f5d9ea79ce23e108d8bfc9b49b5b4a2cf6fad5a35212"
42
  dependencies = [
43
  "actix-http",
44
  "actix-service",
45
  "actix-utils",
46
  "actix-web",
47
+ "bitflags 2.4.1",
 
48
  "bytes 1.5.0",
49
  "derive_more",
50
  "futures-core",
 
54
  "mime_guess",
55
  "percent-encoding 2.3.1",
56
  "pin-project-lite",
57
+ "v_htmlescape",
58
  ]
59
 
60
  [[package]]
 
99
  "pin-project-lite",
100
  "rand 0.8.5",
101
  "sha1",
102
+ "smallvec 1.13.1",
103
  "tokio 1.35.1",
104
  "tokio-util",
105
  "tracing",
 
111
  source = "registry+https://github.com/rust-lang/crates.io-index"
112
  checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb"
113
  dependencies = [
114
+ "quote 1.0.35",
115
+ "syn 2.0.48",
116
  ]
117
 
118
  [[package]]
 
210
  "serde",
211
  "serde_json",
212
  "serde_urlencoded 0.7.1",
213
+ "smallvec 1.13.1",
214
  "socket2",
215
  "time 0.3.31",
216
  "url 2.5.0",
 
223
  checksum = "eb1f50ebbb30eca122b188319a4398b3f7bb4a8cdf50ecfb73bfc6a3c3ce54f5"
224
  dependencies = [
225
  "actix-router",
226
+ "proc-macro2 1.0.78",
227
+ "quote 1.0.35",
228
+ "syn 2.0.48",
229
  ]
230
 
231
  [[package]]
 
346
  source = "registry+https://github.com/rust-lang/crates.io-index"
347
  checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
348
 
 
 
 
 
 
 
349
  [[package]]
350
  name = "async-compression"
351
  version = "0.4.5"
 
372
  source = "registry+https://github.com/rust-lang/crates.io-index"
373
  checksum = "531b97fb4cd3dfdce92c35dedbfdc1f0b9d8091c8ca943d6dae340ef5012d514"
374
  dependencies = [
375
+ "proc-macro2 1.0.78",
376
+ "quote 1.0.35",
377
+ "syn 2.0.48",
378
  ]
379
 
380
  [[package]]
 
738
  source = "registry+https://github.com/rust-lang/crates.io-index"
739
  checksum = "5e1e0fdd2e5d3041e530e1b21158aeeef8b5d0e306bc5c1e3d6cf0930d10e25a"
740
  dependencies = [
741
+ "proc-macro2 1.0.78",
742
+ "quote 1.0.35",
743
  "syn 1.0.109",
744
  ]
745
 
 
950
  "dtoa-short",
951
  "itoa 1.0.10",
952
  "phf 0.11.2",
953
+ "smallvec 1.13.1",
954
  ]
955
 
956
  [[package]]
 
963
  "dtoa-short",
964
  "itoa 1.0.10",
965
  "phf 0.11.2",
966
+ "smallvec 1.13.1",
967
  ]
968
 
969
  [[package]]
 
981
  source = "registry+https://github.com/rust-lang/crates.io-index"
982
  checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331"
983
  dependencies = [
984
+ "quote 1.0.35",
985
+ "syn 2.0.48",
986
  ]
987
 
988
  [[package]]
 
1020
  checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321"
1021
  dependencies = [
1022
  "convert_case",
1023
+ "proc-macro2 1.0.78",
1024
+ "quote 1.0.35",
1025
  "rustc_version 0.4.0",
1026
  "syn 1.0.109",
1027
  ]
 
1094
  "cfg-if 1.0.0",
1095
  ]
1096
 
1097
+ [[package]]
1098
+ name = "env_filter"
1099
+ version = "0.1.0"
1100
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1101
+ checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea"
1102
+ dependencies = [
1103
+ "log",
1104
+ ]
1105
+
1106
  [[package]]
1107
  name = "env_logger"
1108
+ version = "0.11.1"
1109
  source = "registry+https://github.com/rust-lang/crates.io-index"
1110
+ checksum = "05e7cf40684ae96ade6232ed84582f40ce0a66efcd43a5117aef610534f8e0b8"
1111
  dependencies = [
1112
+ "env_filter",
1113
  "log",
1114
  ]
1115
 
 
1174
  source = "registry+https://github.com/rust-lang/crates.io-index"
1175
  checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4"
1176
  dependencies = [
1177
+ "proc-macro2 1.0.78",
1178
+ "quote 1.0.35",
1179
  "syn 1.0.109",
1180
  "synstructure",
1181
  ]
 
1345
  source = "registry+https://github.com/rust-lang/crates.io-index"
1346
  checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
1347
  dependencies = [
1348
+ "proc-macro2 1.0.78",
1349
+ "quote 1.0.35",
1350
+ "syn 2.0.48",
1351
  ]
1352
 
1353
  [[package]]
 
1452
  "parking_lot 0.12.1",
1453
  "quanta",
1454
  "rand 0.8.5",
1455
+ "smallvec 1.13.1",
1456
  ]
1457
 
1458
  [[package]]
 
1558
  "log",
1559
  "mac",
1560
  "markup5ever 0.11.0",
1561
+ "proc-macro2 1.0.78",
1562
+ "quote 1.0.35",
1563
  "syn 1.0.109",
1564
  ]
1565
 
 
1864
 
1865
  [[package]]
1866
  name = "lightningcss"
1867
+ version = "1.0.0-alpha.52"
1868
  source = "registry+https://github.com/rust-lang/crates.io-index"
1869
+ checksum = "771a62dedf5ec563bbfea9760f6c6a6bc546e67355eba0cd7d00c0dc34b11d90"
1870
  dependencies = [
1871
  "ahash 0.7.7",
1872
  "bitflags 2.4.1",
 
1879
  "parcel_selectors",
1880
  "paste",
1881
  "pathdiff",
1882
+ "smallvec 1.13.1",
1883
  ]
1884
 
1885
  [[package]]
 
2020
  checksum = "0be95d66c3024ffce639216058e5bae17a83ecaf266ffc6e4d060ad447c9eed2"
2021
  dependencies = [
2022
  "proc-macro-error",
2023
+ "proc-macro2 1.0.78",
2024
+ "quote 1.0.35",
2025
  "syn 1.0.109",
2026
  ]
2027
 
 
2081
  "crossbeam-utils 0.8.18",
2082
  "dashmap",
2083
  "skeptic",
2084
+ "smallvec 1.13.1",
2085
  "tagptr",
2086
  "triomphe",
2087
  ]
 
2305
  source = "registry+https://github.com/rust-lang/crates.io-index"
2306
  checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
2307
  dependencies = [
2308
+ "proc-macro2 1.0.78",
2309
+ "quote 1.0.35",
2310
+ "syn 2.0.48",
2311
  ]
2312
 
2313
  [[package]]
 
2341
  "phf 0.10.1",
2342
  "phf_codegen 0.10.0",
2343
  "precomputed-hash",
2344
+ "smallvec 1.13.1",
2345
  ]
2346
 
2347
  [[package]]
 
2389
  "cfg-if 1.0.0",
2390
  "libc",
2391
  "redox_syscall 0.4.1",
2392
+ "smallvec 1.13.1",
2393
  "windows-targets 0.48.5",
2394
  ]
2395
 
 
2516
  dependencies = [
2517
  "phf_generator 0.11.2",
2518
  "phf_shared 0.11.2",
2519
+ "proc-macro2 1.0.78",
2520
+ "quote 1.0.35",
2521
+ "syn 2.0.48",
2522
  ]
2523
 
2524
  [[package]]
 
2563
  source = "registry+https://github.com/rust-lang/crates.io-index"
2564
  checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405"
2565
  dependencies = [
2566
+ "proc-macro2 1.0.78",
2567
+ "quote 1.0.35",
2568
+ "syn 2.0.48",
2569
  ]
2570
 
2571
  [[package]]
 
2622
  checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
2623
  dependencies = [
2624
  "proc-macro-error-attr",
2625
+ "proc-macro2 1.0.78",
2626
+ "quote 1.0.35",
2627
  "syn 1.0.109",
2628
  "version_check",
2629
  ]
 
2634
  source = "registry+https://github.com/rust-lang/crates.io-index"
2635
  checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
2636
  dependencies = [
2637
+ "proc-macro2 1.0.78",
2638
+ "quote 1.0.35",
2639
  "version_check",
2640
  ]
2641
 
 
2650
 
2651
  [[package]]
2652
  name = "proc-macro2"
2653
+ version = "1.0.78"
2654
  source = "registry+https://github.com/rust-lang/crates.io-index"
2655
+ checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae"
2656
  dependencies = [
2657
  "unicode-ident",
2658
  ]
 
2705
 
2706
  [[package]]
2707
  name = "quote"
2708
+ version = "1.0.35"
2709
  source = "registry+https://github.com/rust-lang/crates.io-index"
2710
+ checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
2711
  dependencies = [
2712
+ "proc-macro2 1.0.78",
2713
  ]
2714
 
2715
  [[package]]
 
3212
  "phf_codegen 0.10.0",
3213
  "precomputed-hash",
3214
  "servo_arc",
3215
+ "smallvec 1.13.1",
3216
  ]
3217
 
3218
  [[package]]
 
3241
 
3242
  [[package]]
3243
  name = "serde"
3244
+ version = "1.0.196"
3245
  source = "registry+https://github.com/rust-lang/crates.io-index"
3246
+ checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32"
3247
  dependencies = [
3248
  "serde_derive",
3249
  ]
3250
 
3251
  [[package]]
3252
  name = "serde_derive"
3253
+ version = "1.0.196"
3254
  source = "registry+https://github.com/rust-lang/crates.io-index"
3255
+ checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67"
3256
  dependencies = [
3257
+ "proc-macro2 1.0.78",
3258
+ "quote 1.0.35",
3259
+ "syn 2.0.48",
3260
  ]
3261
 
3262
  [[package]]
 
3370
 
3371
  [[package]]
3372
  name = "smallvec"
3373
+ version = "1.13.1"
3374
  source = "registry+https://github.com/rust-lang/crates.io-index"
3375
+ checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7"
3376
  dependencies = [
3377
  "serde",
3378
  ]
 
3445
  dependencies = [
3446
  "phf_generator 0.7.24",
3447
  "phf_shared 0.7.24",
3448
+ "proc-macro2 1.0.78",
3449
+ "quote 1.0.35",
3450
  "string_cache_shared",
3451
  ]
3452
 
 
3458
  dependencies = [
3459
  "phf_generator 0.10.0",
3460
  "phf_shared 0.10.0",
3461
+ "proc-macro2 1.0.78",
3462
+ "quote 1.0.35",
3463
  ]
3464
 
3465
  [[package]]
 
3491
  source = "registry+https://github.com/rust-lang/crates.io-index"
3492
  checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
3493
  dependencies = [
3494
+ "proc-macro2 1.0.78",
3495
+ "quote 1.0.35",
3496
  "unicode-ident",
3497
  ]
3498
 
3499
  [[package]]
3500
  name = "syn"
3501
+ version = "2.0.48"
3502
  source = "registry+https://github.com/rust-lang/crates.io-index"
3503
+ checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f"
3504
  dependencies = [
3505
+ "proc-macro2 1.0.78",
3506
+ "quote 1.0.35",
3507
  "unicode-ident",
3508
  ]
3509
 
 
3513
  source = "registry+https://github.com/rust-lang/crates.io-index"
3514
  checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f"
3515
  dependencies = [
3516
+ "proc-macro2 1.0.78",
3517
+ "quote 1.0.35",
3518
  "syn 1.0.109",
3519
  "unicode-xid 0.2.4",
3520
  ]
 
3737
  source = "registry+https://github.com/rust-lang/crates.io-index"
3738
  checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
3739
  dependencies = [
3740
+ "proc-macro2 1.0.78",
3741
+ "quote 1.0.35",
3742
+ "syn 2.0.48",
3743
  ]
3744
 
3745
  [[package]]
 
4012
  "rand 0.6.5",
4013
  ]
4014
 
4015
+ [[package]]
4016
+ name = "v_htmlescape"
4017
+ version = "0.15.8"
4018
+ source = "registry+https://github.com/rust-lang/crates.io-index"
4019
+ checksum = "4e8257fbc510f0a46eb602c10215901938b5c2a7d5e70fc11483b1d3c9b5b18c"
4020
+
4021
  [[package]]
4022
  name = "vcpkg"
4023
  version = "0.2.15"
 
4091
  "bumpalo",
4092
  "log",
4093
  "once_cell",
4094
+ "proc-macro2 1.0.78",
4095
+ "quote 1.0.35",
4096
+ "syn 2.0.48",
4097
  "wasm-bindgen-shared",
4098
  ]
4099
 
 
4115
  source = "registry+https://github.com/rust-lang/crates.io-index"
4116
  checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2"
4117
  dependencies = [
4118
+ "quote 1.0.35",
4119
  "wasm-bindgen-macro-support",
4120
  ]
4121
 
 
4125
  source = "registry+https://github.com/rust-lang/crates.io-index"
4126
  checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283"
4127
  dependencies = [
4128
+ "proc-macro2 1.0.78",
4129
+ "quote 1.0.35",
4130
+ "syn 2.0.48",
4131
  "wasm-bindgen-backend",
4132
  "wasm-bindgen-shared",
4133
  ]
 
4190
  "scraper",
4191
  "serde",
4192
  "serde_json",
4193
+ "smallvec 1.13.1",
4194
  "tempfile",
4195
  "tokio 1.35.1",
4196
  ]
 
4427
  source = "registry+https://github.com/rust-lang/crates.io-index"
4428
  checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
4429
  dependencies = [
4430
+ "proc-macro2 1.0.78",
4431
+ "quote 1.0.35",
4432
+ "syn 2.0.48",
4433
  ]
4434
 
4435
  [[package]]
Cargo.toml CHANGED
@@ -15,15 +15,15 @@ path = "src/bin/websurfx.rs"
15
  [dependencies]
16
  reqwest = {version="0.11.22", default-features=false, features=["rustls-tls","brotli", "gzip"]}
17
  tokio = {version="1.32.0",features=["rt-multi-thread","macros"], default-features = false}
18
- serde = {version="1.0.190", default-features=false, features=["derive"]}
19
  serde_json = {version="1.0.109", default-features=false}
20
  maud = {version="0.25.0", default-features=false, features=["actix-web"]}
21
  scraper = {version="0.18.1", default-features = false}
22
  actix-web = {version="4.4.0", features = ["cookies", "macros", "compress-brotli"], default-features=false}
23
- actix-files = {version="0.6.2", default-features=false}
24
  actix-cors = {version="0.6.4", default-features=false}
25
  fake-useragent = {version="0.1.3", default-features=false}
26
- env_logger = {version="0.10.0", default-features=false}
27
  log = {version="0.4.20", default-features=false}
28
  mlua = {version="0.9.1", features=["luajit", "vendored"], default-features=false}
29
  redis = {version="0.24.0", features=["tokio-comp","connection-manager"], default-features = false, optional = true}
@@ -31,7 +31,7 @@ blake3 = {version="1.5.0", default-features=false}
31
  error-stack = {version="0.4.0", default-features=false, features=["std"]}
32
  async-trait = {version="0.1.76", default-features=false}
33
  regex = {version="1.9.4", features=["perf"], default-features = false}
34
- smallvec = {version="1.11.0", features=["union", "serde"], default-features=false}
35
  futures = {version="0.3.28", default-features=false}
36
  dhat = {version="0.3.2", optional = true, default-features=false}
37
  mimalloc = { version = "0.1.38", default-features = false }
@@ -50,7 +50,7 @@ criterion = {version="0.5.1", default-features=false}
50
  tempfile = {version="3.8.0", default-features=false}
51
 
52
  [build-dependencies]
53
- lightningcss = {version="1.0.0-alpha.50", default-features=false, features=["grid"]}
54
  minify-js = {version="0.6.0", default-features=false}
55
 
56
  [profile.dev]
 
15
  [dependencies]
16
  reqwest = {version="0.11.22", default-features=false, features=["rustls-tls","brotli", "gzip"]}
17
  tokio = {version="1.32.0",features=["rt-multi-thread","macros"], default-features = false}
18
+ serde = {version="1.0.196", default-features=false, features=["derive"]}
19
  serde_json = {version="1.0.109", default-features=false}
20
  maud = {version="0.25.0", default-features=false, features=["actix-web"]}
21
  scraper = {version="0.18.1", default-features = false}
22
  actix-web = {version="4.4.0", features = ["cookies", "macros", "compress-brotli"], default-features=false}
23
+ actix-files = {version="0.6.5", default-features=false}
24
  actix-cors = {version="0.6.4", default-features=false}
25
  fake-useragent = {version="0.1.3", default-features=false}
26
+ env_logger = {version="0.11.1", default-features=false}
27
  log = {version="0.4.20", default-features=false}
28
  mlua = {version="0.9.1", features=["luajit", "vendored"], default-features=false}
29
  redis = {version="0.24.0", features=["tokio-comp","connection-manager"], default-features = false, optional = true}
 
31
  error-stack = {version="0.4.0", default-features=false, features=["std"]}
32
  async-trait = {version="0.1.76", default-features=false}
33
  regex = {version="1.9.4", features=["perf"], default-features = false}
34
+ smallvec = {version="1.13.1", features=["union", "serde"], default-features=false}
35
  futures = {version="0.3.28", default-features=false}
36
  dhat = {version="0.3.2", optional = true, default-features=false}
37
  mimalloc = { version = "0.1.38", default-features = false }
 
50
  tempfile = {version="3.8.0", default-features=false}
51
 
52
  [build-dependencies]
53
+ lightningcss = {version="1.0.0-alpha.52", default-features=false, features=["grid"]}
54
  minify-js = {version="0.6.0", default-features=false}
55
 
56
  [profile.dev]
src/models/engine_models.rs CHANGED
@@ -86,6 +86,42 @@ pub trait SearchEngine: Sync + Send {
86
  .change_context(EngineError::RequestError)?)
87
  }
88
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  /// This function scrapes results from the upstream engine and puts all the scraped results like
90
  /// title, visiting_url (href in html),engine (from which engine it was fetched from) and description
91
  /// in a RawSearchResult and then adds that to HashMap whose keys are url and values are RawSearchResult
 
86
  .change_context(EngineError::RequestError)?)
87
  }
88
 
89
+ /// This helper function fetches/requests the json search results from the upstream search engine as a vector of bytes.
90
+ ///
91
+ /// # Arguments
92
+ ///
93
+ /// * `url` - It takes the url of the upstream search engine with the user requested search
94
+ /// query appended in the search parameters.
95
+ /// * `header_map` - It takes the http request headers to be sent to the upstream engine in
96
+ /// order to prevent being detected as a bot. It takes the header as a HeaderMap type.
97
+ /// * `request_timeout` - It takes the request timeout value as seconds which is used to limit
98
+ /// the amount of time for each request to remain connected when until the results can be provided
99
+ /// by the upstream engine.
100
+ ///
101
+ /// # Error
102
+ ///
103
+ /// It returns the html data as a vector of bytes if the upstream engine provides the data as expected
104
+ /// otherwise it returns a custom `EngineError`.
105
+ async fn fetch_json_as_bytes_from_upstream(
106
+ &self,
107
+ url: &str,
108
+ header_map: reqwest::header::HeaderMap,
109
+ client: &Client,
110
+ ) -> Result<Vec<u8>, EngineError> {
111
+ // fetch the json response from upstream search engine
112
+
113
+ Ok(client
114
+ .get(url)
115
+ .headers(header_map) // add spoofed headers to emulate human behavior
116
+ .send()
117
+ .await
118
+ .change_context(EngineError::RequestError)?
119
+ .bytes()
120
+ .await
121
+ .change_context(EngineError::RequestError)?
122
+ .to_vec())
123
+ }
124
+
125
  /// This function scrapes results from the upstream engine and puts all the scraped results like
126
  /// title, visiting_url (href in html),engine (from which engine it was fetched from) and description
127
  /// in a RawSearchResult and then adds that to HashMap whose keys are url and values are RawSearchResult