nylon-mesh 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yml +98 -0
- package/Cargo.lock +2965 -0
- package/Cargo.toml +33 -0
- package/README.md +104 -0
- package/bin/nylon-mesh.js +213 -0
- package/bun.lock +360 -0
- package/docs/content/docs/caching.mdx +85 -0
- package/docs/content/docs/configuration.mdx +115 -0
- package/docs/content/docs/index.mdx +58 -0
- package/docs/content/docs/load-balancing.mdx +69 -0
- package/docs/content/docs/meta.json +9 -0
- package/docs/next.config.mjs +11 -0
- package/docs/package-lock.json +6099 -0
- package/docs/package.json +32 -0
- package/docs/postcss.config.mjs +7 -0
- package/docs/source.config.ts +23 -0
- package/docs/src/app/(home)/layout.tsx +6 -0
- package/docs/src/app/(home)/page.tsx +125 -0
- package/docs/src/app/api/search/route.ts +9 -0
- package/docs/src/app/docs/[[...slug]]/page.tsx +46 -0
- package/docs/src/app/docs/layout.tsx +11 -0
- package/docs/src/app/global.css +7 -0
- package/docs/src/app/layout.tsx +31 -0
- package/docs/src/app/llms-full.txt/route.ts +10 -0
- package/docs/src/app/llms.txt/route.ts +13 -0
- package/docs/src/app/og/docs/[...slug]/route.tsx +27 -0
- package/docs/src/components/ai/page-actions.tsx +240 -0
- package/docs/src/components/architecture-diagram.tsx +88 -0
- package/docs/src/components/benchmark.tsx +129 -0
- package/docs/src/components/configuration.tsx +107 -0
- package/docs/src/components/copy-button.tsx +29 -0
- package/docs/src/components/footer.tsx +37 -0
- package/docs/src/components/framework-logos.tsx +35 -0
- package/docs/src/lib/cn.ts +1 -0
- package/docs/src/lib/layout.shared.tsx +23 -0
- package/docs/src/lib/source.ts +27 -0
- package/docs/src/mdx-components.tsx +9 -0
- package/docs/tsconfig.json +46 -0
- package/nylon-mesh.yaml +41 -0
- package/package.json +23 -0
- package/scripts/publish.mjs +18 -0
- package/scripts/release.mjs +52 -0
- package/src/config.rs +91 -0
- package/src/main.rs +214 -0
- package/src/proxy/cache.rs +304 -0
- package/src/proxy/handlers.rs +76 -0
- package/src/proxy/load_balancer.rs +23 -0
- package/src/proxy/mod.rs +232 -0
- package/src/tls_accept.rs +119 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
name: Build ${{ matrix.target }}
|
|
12
|
+
runs-on: ${{ matrix.os }}
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
include:
|
|
17
|
+
- os: ubuntu-latest
|
|
18
|
+
target: x86_64-unknown-linux-gnu
|
|
19
|
+
artifact_name: nylon-mesh
|
|
20
|
+
asset_name: nylon-mesh-linux-gnu-x86_64
|
|
21
|
+
- os: ubuntu-latest
|
|
22
|
+
target: aarch64-unknown-linux-gnu
|
|
23
|
+
artifact_name: nylon-mesh
|
|
24
|
+
asset_name: nylon-mesh-linux-gnu-aarch64
|
|
25
|
+
use-cross: true
|
|
26
|
+
- os: ubuntu-latest
|
|
27
|
+
target: x86_64-unknown-linux-musl
|
|
28
|
+
artifact_name: nylon-mesh
|
|
29
|
+
asset_name: nylon-mesh-linux-musl-x86_64
|
|
30
|
+
use-cross: true
|
|
31
|
+
- os: ubuntu-latest
|
|
32
|
+
target: aarch64-unknown-linux-musl
|
|
33
|
+
artifact_name: nylon-mesh
|
|
34
|
+
asset_name: nylon-mesh-linux-musl-aarch64
|
|
35
|
+
use-cross: true
|
|
36
|
+
- os: macos-latest
|
|
37
|
+
target: x86_64-apple-darwin
|
|
38
|
+
artifact_name: nylon-mesh
|
|
39
|
+
asset_name: nylon-mesh-macos-x86_64
|
|
40
|
+
- os: macos-latest
|
|
41
|
+
target: aarch64-apple-darwin
|
|
42
|
+
artifact_name: nylon-mesh
|
|
43
|
+
asset_name: nylon-mesh-macos-aarch64
|
|
44
|
+
|
|
45
|
+
steps:
|
|
46
|
+
- name: Checkout repository
|
|
47
|
+
uses: actions/checkout@v4
|
|
48
|
+
|
|
49
|
+
- name: Install Rust
|
|
50
|
+
uses: dtolnay/rust-toolchain@stable
|
|
51
|
+
with:
|
|
52
|
+
targets: ${{ matrix.target }}
|
|
53
|
+
|
|
54
|
+
- name: Install cross
|
|
55
|
+
if: matrix.use-cross
|
|
56
|
+
run: cargo install cross --git https://github.com/cross-rs/cross
|
|
57
|
+
|
|
58
|
+
- name: Build binary
|
|
59
|
+
run: |
|
|
60
|
+
if [ "${{ matrix.use-cross }}" == 'true' ]; then
|
|
61
|
+
cross build --release --target ${{ matrix.target }}
|
|
62
|
+
else
|
|
63
|
+
cargo build --release --target ${{ matrix.target }}
|
|
64
|
+
fi
|
|
65
|
+
shell: bash
|
|
66
|
+
|
|
67
|
+
- name: Upload artifact
|
|
68
|
+
uses: actions/upload-artifact@v4
|
|
69
|
+
with:
|
|
70
|
+
name: ${{ matrix.asset_name }}
|
|
71
|
+
path: target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
|
|
72
|
+
|
|
73
|
+
release:
|
|
74
|
+
name: Create Release
|
|
75
|
+
needs: build
|
|
76
|
+
runs-on: ubuntu-latest
|
|
77
|
+
permissions:
|
|
78
|
+
contents: write
|
|
79
|
+
steps:
|
|
80
|
+
- name: Download artifacts
|
|
81
|
+
uses: actions/download-artifact@v4
|
|
82
|
+
with:
|
|
83
|
+
path: artifacts
|
|
84
|
+
|
|
85
|
+
- name: Prepare assets
|
|
86
|
+
run: |
|
|
87
|
+
mkdir release-assets
|
|
88
|
+
for dir in artifacts/*; do
|
|
89
|
+
asset_name=$(basename "$dir")
|
|
90
|
+
mv "$dir"/* "release-assets/$asset_name"
|
|
91
|
+
done
|
|
92
|
+
|
|
93
|
+
- name: Create GitHub Release
|
|
94
|
+
uses: softprops/action-gh-release@v2
|
|
95
|
+
with:
|
|
96
|
+
files: release-assets/*
|
|
97
|
+
env:
|
|
98
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|