├── .cursor └── mcp.json ├── .envrc ├── .github └── workflows │ └── release.yml ├── .gitignore ├── LICENSE ├── README.md ├── flake.lock ├── flake.nix ├── install.sh ├── notes.md ├── rust-toolchain ├── server ├── Cargo.lock ├── Cargo.toml └── src │ ├── main.rs │ ├── mcp.rs │ └── mcp │ └── heap_storage.rs ├── shell.nix └── snapshot ├── Cargo.lock ├── Cargo.toml └── src └── main.rs /.cursor/mcp.json: -------------------------------------------------------------------------------- 1 | { 2 | "mcpServers": { 3 | "js": { 4 | "command": "/Users/robertwendt/mcp-v8/server/target/debug/server --s3-bucket test-mcp-js-bucket" 5 | 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /.envrc: -------------------------------------------------------------------------------- 1 | use flake -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release Rust Server 2 | 3 | on: 4 | push: 5 | tags: 6 | - 'v*.*.*' # Triggers on version tags like v1.2.3 7 | 8 | workflow_dispatch: 9 | 10 | permissions: 11 | contents: write 12 | 13 | jobs: 14 | build: 15 | name: Build ${{ matrix.name }} 16 | runs-on: ${{ matrix.os }} 17 | strategy: 18 | matrix: 19 | include: 20 | - name: Linux x86_64 21 | os: ubuntu-latest 22 | target: x86_64-unknown-linux-gnu 23 | bin_name: mcp-v8-linux 24 | build_cmd: cargo build --release --target x86_64-unknown-linux-gnu 25 | out_path: server/target/x86_64-unknown-linux-gnu/release/server 26 | - name: macOS x86_64 27 | os: macos-13 28 | target: x86_64-apple-darwin 29 | bin_name: mcp-v8-macos 30 | build_cmd: cargo build --release --target x86_64-apple-darwin 31 | out_path: server/target/x86_64-apple-darwin/release/server 32 | - name: macOS ARM64 33 | os: macos-14 34 | target: aarch64-apple-darwin 35 | bin_name: mcp-v8-macos-arm64 36 | build_cmd: cargo build --release --target aarch64-apple-darwin 37 | out_path: server/target/aarch64-apple-darwin/release/server 38 | 39 | steps: 40 | - name: Checkout code 41 | uses: actions/checkout@v4 42 | 43 | - uses: DeterminateSystems/nix-installer-action@main 44 | - uses: DeterminateSystems/flake-checker-action@main 45 | - uses: Swatinem/rust-cache@v2 46 | with: 47 | cache-directories: "server" 48 | 49 | - name: Install target 50 | run: nix develop --command rustup target add ${{ matrix.target }} 51 | 52 | - name: Build 53 | run: cd server && nix develop --command ${{ matrix.build_cmd }} 54 | 55 | - name: Upload binary 56 | uses: actions/upload-artifact@v4 57 | with: 58 | name: ${{ matrix.bin_name }} 59 | path: ${{ matrix.out_path }} 60 | 61 | release: 62 | needs: build 63 | runs-on: ubuntu-latest 64 | steps: 65 | - name: Download all artifacts 66 | uses: actions/download-artifact@v4 67 | with: 68 | path: dist 69 | 70 | - name: Rename and organize binaries 71 | run: | 72 | echo "Listing dist directory:" 73 | ls -l dist 74 | echo "Listing all subdirectories in dist:" 75 | for dir in dist/*; do 76 | if [ -d "$dir" ]; then 77 | echo "Contents of $dir:" 78 | ls -l "$dir" 79 | fi 80 | done 81 | mkdir -p dist/final 82 | for dir in dist/*; do 83 | if [ -d "$dir" ] && [ "$dir" != "dist/final" ]; then 84 | echo "Processing directory: $dir" 85 | bin=$(ls "$dir") 86 | echo "Found binary: $bin in $dir" 87 | dir_trimmed=$(echo "$dir" | sed 's/^dist\///') 88 | echo "Copying $dir/$bin to dist/final/$bin-$dir_trimmed" 89 | cp "$dir/$bin" "dist/final/$bin-$dir_trimmed" 90 | fi 91 | done 92 | # Gzip each binary in dist/final 93 | for file in dist/final/*; do 94 | if [ -f "$file" ]; then 95 | gzip -c "$file" > "$file.gz" 96 | fi 97 | done 98 | 99 | - name: Create GitHub Release 100 | uses: softprops/action-gh-release@v2 101 | with: 102 | files: dist/final/* 103 | env: 104 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .direnv 2 | result 3 | target 4 | test_*.json 5 | snapshot.*.bin 6 | snapshot.bin 7 | .DS_Store -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2025 by Robert Wendt 2 | 3 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. 4 | 5 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # mcp-v8: V8 JavaScript MCP Server 2 | 3 | A Rust-based Model Context Protocol (MCP) server that exposes a V8 JavaScript runtime as a tool for AI agents like Claude and Cursor. Supports persistent heap snapshots via S3 or local filesystem, and is ready for integration with modern AI development environments. 4 | 5 | ## Features 6 | 7 | - **V8 JavaScript Execution**: Run arbitrary JavaScript code in a secure, isolated V8 engine. 8 | - **Heap Snapshots**: Persist and restore V8 heap state between runs, supporting both S3 and local file storage. 9 | - **MCP Protocol**: Implements the Model Context Protocol for seamless tool integration with Claude, Cursor, and other MCP clients. 10 | - **Configurable Storage**: Choose between S3 or local directory for heap storage at runtime. 11 | 12 | ## Installation 13 | 14 | Install `mcp-v8` using the provided install script: 15 | 16 | ```bash 17 | curl -fsSL https://raw.githubusercontent.com/r33drichards/mcp-js/main/install.sh | sudo bash 18 | ``` 19 | 20 | This will automatically download and install the latest release for your platform to `/usr/local/bin/mcp-v8` (you may be prompted for your password). 21 | 22 | --- 23 | 24 | *Advanced users: If you prefer to build from source, see the [Build from Source](#build-from-source) section at the end of this document.* 25 | 26 | ## Command Line Arguments 27 | 28 | `mcp-v8` supports the following command line arguments: 29 | 30 | - `--s3-bucket `: Use AWS S3 for heap snapshots. Specify the S3 bucket name. (Conflicts with `--directory-path`) 31 | - `--directory-path `: Use a local directory for heap snapshots. Specify the directory path. (Conflicts with `--s3-bucket`) 32 | 33 | **Note:** You must specify either `--s3-bucket` or `--directory-path`. If neither is provided, the server defaults to S3 with the bucket name `test-mcp-js-bucket`. 34 | 35 | ## Quick Start 36 | 37 | After installation, you can run the server directly. Choose one of the following options: 38 | 39 | ```bash 40 | # Use S3 for heap storage (recommended for cloud/persistent use) 41 | mcp-v8 --s3-bucket my-bucket-name 42 | 43 | # Use local filesystem directory for heap storage (recommended for local development) 44 | mcp-v8 --directory-path /tmp/mcp-v8-heaps 45 | ``` 46 | 47 | ## Integration 48 | 49 | ### Claude for Desktop 50 | 51 | 1. Install the server as above. 52 | 2. Open Claude Desktop → Settings → Developer → Edit Config. 53 | 3. Add your server to `claude_desktop_config.json`: 54 | 55 | ```json 56 | { 57 | "mcpServers": { 58 | "js": { 59 | "command": "/usr/local/bin/mcp-v8 --s3-bucket my-bucket-name" 60 | } 61 | } 62 | } 63 | ``` 64 | 65 | 4. Restart Claude Desktop. The new tools will appear under the hammer icon. 66 | 67 | ### Cursor 68 | 69 | 1. Install the server as above. 70 | 2. Create or edit `.cursor/mcp.json` in your project root: 71 | 72 | ```json 73 | { 74 | "mcpServers": { 75 | "js": { 76 | "command": "/usr/local/bin/mcp-v8 --directory-path /tmp/mcp-v8-heaps" 77 | } 78 | } 79 | } 80 | ``` 81 | 82 | 3. Restart Cursor. The MCP tools will be available in the UI. 83 | 84 | ## Example Usage 85 | 86 | - Ask Claude or Cursor: "Run this JavaScript: `1 + 2`" 87 | - Use heap snapshots to persist state between runs. 88 | 89 | ## Heap Storage Options 90 | 91 | You can configure heap storage using the following command line arguments: 92 | 93 | - **S3**: `--s3-bucket ` 94 | - Example: `mcp-v8 --s3-bucket my-bucket-name` 95 | - Requires AWS credentials in your environment. 96 | - **Filesystem**: `--directory-path ` 97 | - Example: `mcp-v8 --directory-path /tmp/mcp-v8-heaps` 98 | 99 | **Note:** Only one storage backend can be used at a time. If both are provided, the server will return an error. 100 | 101 | ## Limitations 102 | 103 | While `mcp-v8` provides a powerful and persistent JavaScript execution environment, there are limitations to its runtime. 104 | 105 | - **No `async`/`await` or Promises**: Asynchronous JavaScript is not supported. All code must be synchronous. 106 | - **No `fetch` or network access**: There is no built-in way to make HTTP requests or access the network. 107 | - **No `console.log` or standard output**: Output from `console.log` or similar functions will not appear. To return results, ensure the value you want is the last line of your code. 108 | - **No file system access**: The runtime does not provide access to the local file system or environment variables. 109 | - **No `npm install` or external packages**: You cannot install or import npm packages. Only standard JavaScript (ECMAScript) built-ins are available. 110 | - **No timers**: Functions like `setTimeout` and `setInterval` are not available. 111 | - **No DOM or browser APIs**: This is not a browser environment; there is no access to `window`, `document`, or other browser-specific objects. 112 | 113 | --- 114 | 115 | ## Build from Source (Advanced) 116 | 117 | If you prefer to build from source instead of using the install script: 118 | 119 | ### Prerequisites 120 | - Rust (nightly toolchain recommended) 121 | - (Optional) AWS credentials for S3 storage 122 | 123 | ### Build the Server 124 | 125 | ```bash 126 | cd server 127 | cargo build --release 128 | ``` 129 | 130 | The built binary will be located at `server/target/release/server`. You can use this path in the integration steps above instead of `/usr/local/bin/mcp-v8` if desired. 131 | -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "flake-utils": { 4 | "inputs": { 5 | "systems": "systems" 6 | }, 7 | "locked": { 8 | "lastModified": 1731533236, 9 | "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", 10 | "owner": "numtide", 11 | "repo": "flake-utils", 12 | "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", 13 | "type": "github" 14 | }, 15 | "original": { 16 | "owner": "numtide", 17 | "repo": "flake-utils", 18 | "type": "github" 19 | } 20 | }, 21 | "nixpkgs": { 22 | "locked": { 23 | "lastModified": 1744098102, 24 | "narHash": "sha256-tzCdyIJj9AjysC3OuKA+tMD/kDEDAF9mICPDU7ix0JA=", 25 | "owner": "NixOS", 26 | "repo": "nixpkgs", 27 | "rev": "c8cd81426f45942bb2906d5ed2fe21d2f19d95b7", 28 | "type": "github" 29 | }, 30 | "original": { 31 | "owner": "NixOS", 32 | "ref": "nixos-unstable", 33 | "repo": "nixpkgs", 34 | "type": "github" 35 | } 36 | }, 37 | "root": { 38 | "inputs": { 39 | "flake-utils": "flake-utils", 40 | "nixpkgs": "nixpkgs" 41 | } 42 | }, 43 | "systems": { 44 | "locked": { 45 | "lastModified": 1681028828, 46 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 47 | "owner": "nix-systems", 48 | "repo": "default", 49 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 50 | "type": "github" 51 | }, 52 | "original": { 53 | "owner": "nix-systems", 54 | "repo": "default", 55 | "type": "github" 56 | } 57 | } 58 | }, 59 | "root": "root", 60 | "version": 7 61 | } 62 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "A basic rust cli"; 3 | 4 | inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 5 | inputs.flake-utils.url = "github:numtide/flake-utils"; 6 | 7 | outputs = { self, nixpkgs, flake-utils, ... }: 8 | (flake-utils.lib.eachDefaultSystem (system: 9 | let 10 | pkgs = import nixpkgs { inherit system; }; 11 | in { 12 | devShells.default = import ./shell.nix { inherit pkgs; }; 13 | })); 14 | } 15 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | REPO="r33drichards/mcp-js" 5 | INSTALL_DIR="/usr/local/bin" 6 | 7 | # Detect latest version if not specified 8 | if [ -z "$MCP_V8_VERSION" ]; then 9 | MCP_V8_VERSION=$(curl -s "https://api.github.com/repos/$REPO/releases/latest" | grep '"tag_name":' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/') 10 | fi 11 | 12 | if [ -z "$MCP_V8_VERSION" ]; then 13 | echo "Could not determine latest release version. Set MCP_V8_VERSION env var to override." 14 | exit 1 15 | fi 16 | 17 | echo "Installing mcp-v8 version: $MCP_V8_VERSION" 18 | 19 | # Detect OS and ARCH 20 | OS=$(uname -s) 21 | ARCH=$(uname -m) 22 | 23 | case "$OS" in 24 | Linux) 25 | PLATFORM="linux" 26 | ;; 27 | Darwin) 28 | if [ "$ARCH" = "arm64" ]; then 29 | PLATFORM="macos-arm64" 30 | else 31 | PLATFORM="macos" 32 | fi 33 | ;; 34 | *) 35 | echo "Unsupported OS: $OS" 36 | exit 1 37 | ;; 38 | esac 39 | 40 | BINARY_NAME="server-mcp-v8-$PLATFORM" 41 | BINARY_GZ="$BINARY_NAME.gz" 42 | DOWNLOAD_URL="https://github.com/$REPO/releases/download/$MCP_V8_VERSION/$BINARY_GZ" 43 | 44 | echo "Downloading $DOWNLOAD_URL" 45 | curl -L -o "$BINARY_GZ" "$DOWNLOAD_URL" 46 | 47 | echo "Extracting binary..." 48 | gunzip -f "$BINARY_GZ" 49 | 50 | # Find install dir 51 | if [ -w "$INSTALL_DIR" ]; then 52 | TARGET="$INSTALL_DIR/mcp-v8" 53 | mv "$BINARY_NAME" "$TARGET" 54 | chmod +x "$TARGET" 55 | else 56 | TARGET="$INSTALL_DIR/mcp-v8" 57 | sudo mv "$BINARY_NAME" "$TARGET" 58 | sudo chmod +x "$TARGET" 59 | fi 60 | 61 | echo "Installed mcp-v8 to $TARGET" 62 | echo "You can now run: mcp-v8" 63 | -------------------------------------------------------------------------------- /notes.md: -------------------------------------------------------------------------------- 1 | https://til.simonwillison.net/deno/pyodide-sandbox 2 | https://news.ycombinator.com/item?id=43691230 3 | https://cran.r-project.org/web/packages/V8/vignettes/npm.html 4 | 5 | https://github.com/modelcontextprotocol/rust-sdk/blob/main/examples/servers/src/std_io.rs 6 | 7 | # embedding v8 c++ https://v8.dev/docs/embed 8 | 9 | # example test https://github.com/denoland/rusty_v8/blob/main/tests/test_api.rs#L5352 10 | 11 | ```rust 12 | 13 | fn eval<'s>( 14 | scope: &mut v8::HandleScope<'s>, 15 | code: &str, 16 | ) -> Option> { 17 | let scope = &mut v8::EscapableHandleScope::new(scope); 18 | let source = v8::String::new(scope, code).unwrap(); 19 | let script = v8::Script::compile(scope, source, None).unwrap(); 20 | let r = script.run(scope); 21 | r.map(|v| scope.escape(v)) 22 | } 23 | 24 | 25 | #[test] 26 | fn snapshot_creator() { 27 | let _setup_guard = setup::sequential_test(); 28 | // First we create the snapshot, there is a single global variable 'a' set to 29 | // the value 3. 30 | let isolate_data_index; 31 | let context_data_index; 32 | let context_data_index_2; 33 | let startup_data = { 34 | let mut snapshot_creator = v8::Isolate::snapshot_creator(None, None); 35 | { 36 | let scope = &mut v8::HandleScope::new(&mut snapshot_creator); 37 | let context = v8::Context::new(scope, Default::default()); 38 | let scope = &mut v8::ContextScope::new(scope, context); 39 | eval(scope, "b = 2 + 3").unwrap(); 40 | scope.set_default_context(context); 41 | } 42 | 43 | snapshot_creator 44 | .create_blob(v8::FunctionCodeHandling::Clear) 45 | .unwrap() 46 | }; 47 | 48 | let startup_data = { 49 | let mut snapshot_creator = 50 | v8::Isolate::snapshot_creator_from_existing_snapshot( 51 | startup_data, 52 | None, 53 | None, 54 | ); 55 | { 56 | // Check that the SnapshotCreator isolate has been set up correctly. 57 | let _ = snapshot_creator.thread_safe_handle(); 58 | 59 | let scope = &mut v8::HandleScope::new(&mut snapshot_creator); 60 | let context = v8::Context::new(scope, Default::default()); 61 | let scope = &mut v8::ContextScope::new(scope, context); 62 | eval(scope, "a = 1 + 2").unwrap(); 63 | 64 | scope.set_default_context(context); 65 | 66 | let n1 = v8::Number::new(scope, 1.0); 67 | let n2 = v8::Number::new(scope, 2.0); 68 | let n3 = v8::Number::new(scope, 3.0); 69 | isolate_data_index = scope.add_isolate_data(n1); 70 | context_data_index = scope.add_context_data(context, n2); 71 | context_data_index_2 = scope.add_context_data(context, n3); 72 | } 73 | snapshot_creator 74 | .create_blob(v8::FunctionCodeHandling::Clear) 75 | .unwrap() 76 | }; 77 | assert!(!startup_data.is_empty()); 78 | // Now we try to load up the snapshot and check that 'a' has the correct 79 | // value. 80 | { 81 | let params = v8::Isolate::create_params().snapshot_blob(startup_data); 82 | let isolate = &mut v8::Isolate::new(params); 83 | { 84 | let scope = &mut v8::HandleScope::new(isolate); 85 | let context = v8::Context::new(scope, Default::default()); 86 | let scope = &mut v8::ContextScope::new(scope, context); 87 | let result = eval(scope, "a === 3").unwrap(); 88 | let true_val = v8::Boolean::new(scope, true).into(); 89 | assert!(result.same_value(true_val)); 90 | 91 | let result = eval(scope, "b === 5").unwrap(); 92 | let true_val = v8::Boolean::new(scope, true).into(); 93 | assert!(result.same_value(true_val)); 94 | 95 | let isolate_data = scope 96 | .get_isolate_data_from_snapshot_once::(isolate_data_index); 97 | assert!(isolate_data.unwrap() == v8::Number::new(scope, 1.0)); 98 | let no_data_err = scope 99 | .get_isolate_data_from_snapshot_once::(isolate_data_index); 100 | assert!(matches!(no_data_err, Err(v8::DataError::NoData { .. }))); 101 | 102 | let context_data = scope 103 | .get_context_data_from_snapshot_once::(context_data_index); 104 | assert!(context_data.unwrap() == v8::Number::new(scope, 2.0)); 105 | let no_data_err = scope 106 | .get_context_data_from_snapshot_once::(context_data_index); 107 | assert!(matches!(no_data_err, Err(v8::DataError::NoData { .. }))); 108 | 109 | let bad_type_err = scope 110 | .get_context_data_from_snapshot_once::( 111 | context_data_index_2, 112 | ); 113 | assert!(matches!(bad_type_err, Err(v8::DataError::BadType { .. }))); 114 | // Ensure we can compile a request for v8::Data 115 | _ = scope 116 | .get_context_data_from_snapshot_once::(context_data_index_2); 117 | } 118 | } 119 | } 120 | ``` 121 | -------------------------------------------------------------------------------- /rust-toolchain: -------------------------------------------------------------------------------- 1 | nightly -------------------------------------------------------------------------------- /server/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 4 4 | 5 | [[package]] 6 | name = "addr2line" 7 | version = "0.24.2" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" 10 | dependencies = [ 11 | "gimli", 12 | ] 13 | 14 | [[package]] 15 | name = "adler" 16 | version = "1.0.2" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 19 | 20 | [[package]] 21 | name = "adler2" 22 | version = "2.0.0" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" 25 | 26 | [[package]] 27 | name = "aho-corasick" 28 | version = "1.1.3" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" 31 | dependencies = [ 32 | "memchr", 33 | ] 34 | 35 | [[package]] 36 | name = "android-tzdata" 37 | version = "0.1.1" 38 | source = "registry+https://github.com/rust-lang/crates.io-index" 39 | checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" 40 | 41 | [[package]] 42 | name = "android_system_properties" 43 | version = "0.1.5" 44 | source = "registry+https://github.com/rust-lang/crates.io-index" 45 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 46 | dependencies = [ 47 | "libc", 48 | ] 49 | 50 | [[package]] 51 | name = "anstream" 52 | version = "0.6.18" 53 | source = "registry+https://github.com/rust-lang/crates.io-index" 54 | checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" 55 | dependencies = [ 56 | "anstyle", 57 | "anstyle-parse", 58 | "anstyle-query", 59 | "anstyle-wincon", 60 | "colorchoice", 61 | "is_terminal_polyfill", 62 | "utf8parse", 63 | ] 64 | 65 | [[package]] 66 | name = "anstyle" 67 | version = "1.0.10" 68 | source = "registry+https://github.com/rust-lang/crates.io-index" 69 | checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" 70 | 71 | [[package]] 72 | name = "anstyle-parse" 73 | version = "0.2.6" 74 | source = "registry+https://github.com/rust-lang/crates.io-index" 75 | checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" 76 | dependencies = [ 77 | "utf8parse", 78 | ] 79 | 80 | [[package]] 81 | name = "anstyle-query" 82 | version = "1.1.2" 83 | source = "registry+https://github.com/rust-lang/crates.io-index" 84 | checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" 85 | dependencies = [ 86 | "windows-sys 0.59.0", 87 | ] 88 | 89 | [[package]] 90 | name = "anstyle-wincon" 91 | version = "3.0.7" 92 | source = "registry+https://github.com/rust-lang/crates.io-index" 93 | checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" 94 | dependencies = [ 95 | "anstyle", 96 | "once_cell", 97 | "windows-sys 0.59.0", 98 | ] 99 | 100 | [[package]] 101 | name = "anyhow" 102 | version = "1.0.98" 103 | source = "registry+https://github.com/rust-lang/crates.io-index" 104 | checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" 105 | 106 | [[package]] 107 | name = "async-trait" 108 | version = "0.1.88" 109 | source = "registry+https://github.com/rust-lang/crates.io-index" 110 | checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" 111 | dependencies = [ 112 | "proc-macro2", 113 | "quote", 114 | "syn", 115 | ] 116 | 117 | [[package]] 118 | name = "autocfg" 119 | version = "1.4.0" 120 | source = "registry+https://github.com/rust-lang/crates.io-index" 121 | checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" 122 | 123 | [[package]] 124 | name = "aws-config" 125 | version = "0.0.26-alpha" 126 | source = "registry+https://github.com/rust-lang/crates.io-index" 127 | checksum = "f072f0d08f62093e2a38603307e368bf90d5acd3e3b54b60292cba4698bba38b" 128 | dependencies = [ 129 | "aws-http", 130 | "aws-hyper", 131 | "aws-sdk-sts", 132 | "aws-smithy-async", 133 | "aws-smithy-client", 134 | "aws-smithy-http", 135 | "aws-smithy-http-tower", 136 | "aws-smithy-json", 137 | "aws-smithy-types", 138 | "aws-types", 139 | "bytes", 140 | "http 0.2.12", 141 | "tokio", 142 | "tower 0.4.13", 143 | "tracing", 144 | ] 145 | 146 | [[package]] 147 | name = "aws-endpoint" 148 | version = "0.0.26-alpha" 149 | source = "registry+https://github.com/rust-lang/crates.io-index" 150 | checksum = "4b4d939891f640c013bbae11180e767470d75c9d61b48d85008fbd19a46e6a46" 151 | dependencies = [ 152 | "aws-smithy-http", 153 | "aws-types", 154 | "http 0.2.12", 155 | "regex", 156 | "tracing", 157 | ] 158 | 159 | [[package]] 160 | name = "aws-http" 161 | version = "0.0.26-alpha" 162 | source = "registry+https://github.com/rust-lang/crates.io-index" 163 | checksum = "f685b9441c4e99d478b4e70cd0993ed178029534c296143ae9d37f2a424dde82" 164 | dependencies = [ 165 | "aws-smithy-http", 166 | "aws-smithy-types", 167 | "aws-types", 168 | "http 0.2.12", 169 | "lazy_static", 170 | "tracing", 171 | ] 172 | 173 | [[package]] 174 | name = "aws-hyper" 175 | version = "0.0.26-alpha" 176 | source = "registry+https://github.com/rust-lang/crates.io-index" 177 | checksum = "b5f0a1a3500ec4b07ba95b56df754dd1a3b0555b1f27f71592bbfa3ee4a8e2a7" 178 | dependencies = [ 179 | "aws-endpoint", 180 | "aws-http", 181 | "aws-sig-auth", 182 | "aws-smithy-client", 183 | "aws-smithy-http", 184 | "aws-smithy-http-tower", 185 | "aws-smithy-types", 186 | "bytes", 187 | "fastrand", 188 | "http 0.2.12", 189 | "http-body 0.4.6", 190 | "hyper 0.14.32", 191 | "hyper-rustls", 192 | "pin-project", 193 | "tokio", 194 | "tower 0.4.13", 195 | "tracing", 196 | ] 197 | 198 | [[package]] 199 | name = "aws-sdk-s3" 200 | version = "0.0.26-alpha" 201 | source = "registry+https://github.com/rust-lang/crates.io-index" 202 | checksum = "8787be2f5db0c01ec5b4e89d159cd0d25b536172173c2145463aac669ad2142b" 203 | dependencies = [ 204 | "aws-endpoint", 205 | "aws-http", 206 | "aws-hyper", 207 | "aws-sig-auth", 208 | "aws-sigv4", 209 | "aws-smithy-async", 210 | "aws-smithy-client", 211 | "aws-smithy-eventstream", 212 | "aws-smithy-http", 213 | "aws-smithy-types", 214 | "aws-smithy-xml", 215 | "aws-types", 216 | "bytes", 217 | "http 0.2.12", 218 | "md5", 219 | "tower 0.4.13", 220 | ] 221 | 222 | [[package]] 223 | name = "aws-sdk-sts" 224 | version = "0.0.26-alpha" 225 | source = "registry+https://github.com/rust-lang/crates.io-index" 226 | checksum = "2b8858771f3809ff70b1c9ebc464b86bf2d7c6ce50a0c2f153484abe45ca76f9" 227 | dependencies = [ 228 | "aws-endpoint", 229 | "aws-http", 230 | "aws-hyper", 231 | "aws-sig-auth", 232 | "aws-smithy-async", 233 | "aws-smithy-client", 234 | "aws-smithy-http", 235 | "aws-smithy-query", 236 | "aws-smithy-types", 237 | "aws-smithy-xml", 238 | "aws-types", 239 | "bytes", 240 | "http 0.2.12", 241 | ] 242 | 243 | [[package]] 244 | name = "aws-sig-auth" 245 | version = "0.0.26-alpha" 246 | source = "registry+https://github.com/rust-lang/crates.io-index" 247 | checksum = "469d7527fc24e3edc32e5edf1b046d7d7c778ed6c4f9c51f869725bb01c101db" 248 | dependencies = [ 249 | "aws-sigv4", 250 | "aws-smithy-eventstream", 251 | "aws-smithy-http", 252 | "aws-types", 253 | "http 0.2.12", 254 | "thiserror 1.0.69", 255 | "tracing", 256 | ] 257 | 258 | [[package]] 259 | name = "aws-sigv4" 260 | version = "0.0.26-alpha" 261 | source = "registry+https://github.com/rust-lang/crates.io-index" 262 | checksum = "cb7d4888513285ec13c9b02c9bf8a3cf264251fc4c51270ca35239e39b18cb57" 263 | dependencies = [ 264 | "aws-smithy-eventstream", 265 | "bytes", 266 | "form_urlencoded", 267 | "hex", 268 | "http 0.2.12", 269 | "once_cell", 270 | "percent-encoding", 271 | "regex", 272 | "ring", 273 | "time", 274 | "tracing", 275 | ] 276 | 277 | [[package]] 278 | name = "aws-smithy-async" 279 | version = "0.30.0-alpha" 280 | source = "registry+https://github.com/rust-lang/crates.io-index" 281 | checksum = "34b323275f9a5118ce0c61c1f509d89d97008f4d6e376826bc744b43b553bf33" 282 | dependencies = [ 283 | "pin-project-lite", 284 | "tokio", 285 | ] 286 | 287 | [[package]] 288 | name = "aws-smithy-client" 289 | version = "0.30.0-alpha" 290 | source = "registry+https://github.com/rust-lang/crates.io-index" 291 | checksum = "eda35ddfd69ad9623dbb66aeaac1b85bc03974fdb4054fcd05cdb4ce1a78bf12" 292 | dependencies = [ 293 | "aws-smithy-async", 294 | "aws-smithy-http", 295 | "aws-smithy-http-tower", 296 | "aws-smithy-types", 297 | "bytes", 298 | "fastrand", 299 | "http 0.2.12", 300 | "http-body 0.4.6", 301 | "hyper 0.14.32", 302 | "hyper-rustls", 303 | "lazy_static", 304 | "pin-project", 305 | "pin-project-lite", 306 | "tokio", 307 | "tower 0.4.13", 308 | "tracing", 309 | ] 310 | 311 | [[package]] 312 | name = "aws-smithy-eventstream" 313 | version = "0.30.0-alpha" 314 | source = "registry+https://github.com/rust-lang/crates.io-index" 315 | checksum = "8773ed74ad621f35faac419d0f93778da5b0893780ae8a674aec9d27850335ff" 316 | dependencies = [ 317 | "aws-smithy-types", 318 | "bytes", 319 | "crc32fast", 320 | ] 321 | 322 | [[package]] 323 | name = "aws-smithy-http" 324 | version = "0.30.0-alpha" 325 | source = "registry+https://github.com/rust-lang/crates.io-index" 326 | checksum = "c8068bb0c3d2f512ec2ff6c4e74e639266f89bb4bd492f747c4290fe41d17a6e" 327 | dependencies = [ 328 | "aws-smithy-eventstream", 329 | "aws-smithy-types", 330 | "bytes", 331 | "bytes-utils", 332 | "futures-core", 333 | "http 0.2.12", 334 | "http-body 0.4.6", 335 | "hyper 0.14.32", 336 | "percent-encoding", 337 | "pin-project", 338 | "tokio", 339 | "tokio-util 0.6.10", 340 | "tracing", 341 | ] 342 | 343 | [[package]] 344 | name = "aws-smithy-http-tower" 345 | version = "0.30.0-alpha" 346 | source = "registry+https://github.com/rust-lang/crates.io-index" 347 | checksum = "7beb34a340675391abe55d5ab2619ef2b1c85995126ba1706ba2657ccd602be3" 348 | dependencies = [ 349 | "aws-smithy-http", 350 | "bytes", 351 | "http 0.2.12", 352 | "http-body 0.4.6", 353 | "pin-project", 354 | "tower 0.4.13", 355 | "tracing", 356 | ] 357 | 358 | [[package]] 359 | name = "aws-smithy-json" 360 | version = "0.30.0-alpha" 361 | source = "registry+https://github.com/rust-lang/crates.io-index" 362 | checksum = "721176eec47b71d3226d61ccaa40cebe83ddc644c8981c7c3b34547a62808eb3" 363 | dependencies = [ 364 | "aws-smithy-types", 365 | ] 366 | 367 | [[package]] 368 | name = "aws-smithy-query" 369 | version = "0.30.0-alpha" 370 | source = "registry+https://github.com/rust-lang/crates.io-index" 371 | checksum = "ef0c0dc09c61921a2104e1487810bd32274d8b57dd00d878895ebc51e2068d85" 372 | dependencies = [ 373 | "aws-smithy-types", 374 | "urlencoding", 375 | ] 376 | 377 | [[package]] 378 | name = "aws-smithy-types" 379 | version = "0.30.0-alpha" 380 | source = "registry+https://github.com/rust-lang/crates.io-index" 381 | checksum = "a422c3740103fe67102ecbedffe8318dd6a03a209f7e097d1e00a1f3f4d186ac" 382 | dependencies = [ 383 | "itoa 0.4.8", 384 | "num-integer", 385 | "ryu", 386 | "time", 387 | ] 388 | 389 | [[package]] 390 | name = "aws-smithy-xml" 391 | version = "0.30.0-alpha" 392 | source = "registry+https://github.com/rust-lang/crates.io-index" 393 | checksum = "5c884d1dc27ccf45763d42b9f58425493b6cd563a95922f92b87a5d92c4060d4" 394 | dependencies = [ 395 | "thiserror 1.0.69", 396 | "xmlparser", 397 | ] 398 | 399 | [[package]] 400 | name = "aws-types" 401 | version = "0.0.26-alpha" 402 | source = "registry+https://github.com/rust-lang/crates.io-index" 403 | checksum = "4761c3bc4d965b2a3568eaadbfc85eee3cbaa18ba81665f2f472004cb8bb34e9" 404 | dependencies = [ 405 | "aws-smithy-async", 406 | "aws-smithy-types", 407 | "rustc_version", 408 | "tracing", 409 | "zeroize", 410 | ] 411 | 412 | [[package]] 413 | name = "axum" 414 | version = "0.8.4" 415 | source = "registry+https://github.com/rust-lang/crates.io-index" 416 | checksum = "021e862c184ae977658b36c4500f7feac3221ca5da43e3f25bd04ab6c79a29b5" 417 | dependencies = [ 418 | "axum-core", 419 | "bytes", 420 | "form_urlencoded", 421 | "futures-util", 422 | "http 1.3.1", 423 | "http-body 1.0.1", 424 | "http-body-util", 425 | "hyper 1.6.0", 426 | "hyper-util", 427 | "itoa 1.0.15", 428 | "matchit", 429 | "memchr", 430 | "mime", 431 | "percent-encoding", 432 | "pin-project-lite", 433 | "rustversion", 434 | "serde", 435 | "serde_json", 436 | "serde_path_to_error", 437 | "serde_urlencoded", 438 | "sync_wrapper", 439 | "tokio", 440 | "tower 0.5.2", 441 | "tower-layer", 442 | "tower-service", 443 | "tracing", 444 | ] 445 | 446 | [[package]] 447 | name = "axum-core" 448 | version = "0.5.2" 449 | source = "registry+https://github.com/rust-lang/crates.io-index" 450 | checksum = "68464cd0412f486726fb3373129ef5d2993f90c34bc2bc1c1e9943b2f4fc7ca6" 451 | dependencies = [ 452 | "bytes", 453 | "futures-core", 454 | "http 1.3.1", 455 | "http-body 1.0.1", 456 | "http-body-util", 457 | "mime", 458 | "pin-project-lite", 459 | "rustversion", 460 | "sync_wrapper", 461 | "tower-layer", 462 | "tower-service", 463 | "tracing", 464 | ] 465 | 466 | [[package]] 467 | name = "backtrace" 468 | version = "0.3.75" 469 | source = "registry+https://github.com/rust-lang/crates.io-index" 470 | checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" 471 | dependencies = [ 472 | "addr2line", 473 | "cfg-if", 474 | "libc", 475 | "miniz_oxide 0.8.8", 476 | "object", 477 | "rustc-demangle", 478 | "windows-targets", 479 | ] 480 | 481 | [[package]] 482 | name = "base64" 483 | version = "0.13.1" 484 | source = "registry+https://github.com/rust-lang/crates.io-index" 485 | checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" 486 | 487 | [[package]] 488 | name = "base64" 489 | version = "0.21.7" 490 | source = "registry+https://github.com/rust-lang/crates.io-index" 491 | checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" 492 | 493 | [[package]] 494 | name = "bindgen" 495 | version = "0.71.1" 496 | source = "registry+https://github.com/rust-lang/crates.io-index" 497 | checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" 498 | dependencies = [ 499 | "bitflags", 500 | "cexpr", 501 | "clang-sys", 502 | "itertools", 503 | "log", 504 | "prettyplease", 505 | "proc-macro2", 506 | "quote", 507 | "regex", 508 | "rustc-hash", 509 | "shlex", 510 | "syn", 511 | ] 512 | 513 | [[package]] 514 | name = "bitflags" 515 | version = "2.9.0" 516 | source = "registry+https://github.com/rust-lang/crates.io-index" 517 | checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" 518 | 519 | [[package]] 520 | name = "bumpalo" 521 | version = "3.17.0" 522 | source = "registry+https://github.com/rust-lang/crates.io-index" 523 | checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" 524 | 525 | [[package]] 526 | name = "bytes" 527 | version = "1.10.1" 528 | source = "registry+https://github.com/rust-lang/crates.io-index" 529 | checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" 530 | 531 | [[package]] 532 | name = "bytes-utils" 533 | version = "0.1.4" 534 | source = "registry+https://github.com/rust-lang/crates.io-index" 535 | checksum = "7dafe3a8757b027e2be6e4e5601ed563c55989fcf1546e933c66c8eb3a058d35" 536 | dependencies = [ 537 | "bytes", 538 | "either", 539 | ] 540 | 541 | [[package]] 542 | name = "cc" 543 | version = "1.2.22" 544 | source = "registry+https://github.com/rust-lang/crates.io-index" 545 | checksum = "32db95edf998450acc7881c932f94cd9b05c87b4b2599e8bab064753da4acfd1" 546 | dependencies = [ 547 | "shlex", 548 | ] 549 | 550 | [[package]] 551 | name = "cexpr" 552 | version = "0.6.0" 553 | source = "registry+https://github.com/rust-lang/crates.io-index" 554 | checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" 555 | dependencies = [ 556 | "nom", 557 | ] 558 | 559 | [[package]] 560 | name = "cfg-if" 561 | version = "1.0.0" 562 | source = "registry+https://github.com/rust-lang/crates.io-index" 563 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 564 | 565 | [[package]] 566 | name = "chrono" 567 | version = "0.4.41" 568 | source = "registry+https://github.com/rust-lang/crates.io-index" 569 | checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" 570 | dependencies = [ 571 | "android-tzdata", 572 | "iana-time-zone", 573 | "js-sys", 574 | "num-traits", 575 | "serde", 576 | "wasm-bindgen", 577 | "windows-link", 578 | ] 579 | 580 | [[package]] 581 | name = "clang-sys" 582 | version = "1.8.1" 583 | source = "registry+https://github.com/rust-lang/crates.io-index" 584 | checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" 585 | dependencies = [ 586 | "glob", 587 | "libc", 588 | "libloading", 589 | ] 590 | 591 | [[package]] 592 | name = "clap" 593 | version = "4.5.38" 594 | source = "registry+https://github.com/rust-lang/crates.io-index" 595 | checksum = "ed93b9805f8ba930df42c2590f05453d5ec36cbb85d018868a5b24d31f6ac000" 596 | dependencies = [ 597 | "clap_builder", 598 | "clap_derive", 599 | ] 600 | 601 | [[package]] 602 | name = "clap_builder" 603 | version = "4.5.38" 604 | source = "registry+https://github.com/rust-lang/crates.io-index" 605 | checksum = "379026ff283facf611b0ea629334361c4211d1b12ee01024eec1591133b04120" 606 | dependencies = [ 607 | "anstream", 608 | "anstyle", 609 | "clap_lex", 610 | "strsim", 611 | ] 612 | 613 | [[package]] 614 | name = "clap_derive" 615 | version = "4.5.32" 616 | source = "registry+https://github.com/rust-lang/crates.io-index" 617 | checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" 618 | dependencies = [ 619 | "heck", 620 | "proc-macro2", 621 | "quote", 622 | "syn", 623 | ] 624 | 625 | [[package]] 626 | name = "clap_lex" 627 | version = "0.7.4" 628 | source = "registry+https://github.com/rust-lang/crates.io-index" 629 | checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" 630 | 631 | [[package]] 632 | name = "colorchoice" 633 | version = "1.0.3" 634 | source = "registry+https://github.com/rust-lang/crates.io-index" 635 | checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" 636 | 637 | [[package]] 638 | name = "core-foundation" 639 | version = "0.9.4" 640 | source = "registry+https://github.com/rust-lang/crates.io-index" 641 | checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" 642 | dependencies = [ 643 | "core-foundation-sys", 644 | "libc", 645 | ] 646 | 647 | [[package]] 648 | name = "core-foundation-sys" 649 | version = "0.8.7" 650 | source = "registry+https://github.com/rust-lang/crates.io-index" 651 | checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" 652 | 653 | [[package]] 654 | name = "crc32fast" 655 | version = "1.4.2" 656 | source = "registry+https://github.com/rust-lang/crates.io-index" 657 | checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" 658 | dependencies = [ 659 | "cfg-if", 660 | ] 661 | 662 | [[package]] 663 | name = "ct-logs" 664 | version = "0.8.0" 665 | source = "registry+https://github.com/rust-lang/crates.io-index" 666 | checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8" 667 | dependencies = [ 668 | "sct", 669 | ] 670 | 671 | [[package]] 672 | name = "deranged" 673 | version = "0.4.0" 674 | source = "registry+https://github.com/rust-lang/crates.io-index" 675 | checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" 676 | dependencies = [ 677 | "powerfmt", 678 | ] 679 | 680 | [[package]] 681 | name = "dyn-clone" 682 | version = "1.0.19" 683 | source = "registry+https://github.com/rust-lang/crates.io-index" 684 | checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" 685 | 686 | [[package]] 687 | name = "either" 688 | version = "1.15.0" 689 | source = "registry+https://github.com/rust-lang/crates.io-index" 690 | checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" 691 | 692 | [[package]] 693 | name = "equivalent" 694 | version = "1.0.2" 695 | source = "registry+https://github.com/rust-lang/crates.io-index" 696 | checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" 697 | 698 | [[package]] 699 | name = "errno" 700 | version = "0.3.11" 701 | source = "registry+https://github.com/rust-lang/crates.io-index" 702 | checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" 703 | dependencies = [ 704 | "libc", 705 | "windows-sys 0.59.0", 706 | ] 707 | 708 | [[package]] 709 | name = "fastrand" 710 | version = "1.9.0" 711 | source = "registry+https://github.com/rust-lang/crates.io-index" 712 | checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" 713 | dependencies = [ 714 | "instant", 715 | ] 716 | 717 | [[package]] 718 | name = "fnv" 719 | version = "1.0.7" 720 | source = "registry+https://github.com/rust-lang/crates.io-index" 721 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 722 | 723 | [[package]] 724 | name = "form_urlencoded" 725 | version = "1.2.1" 726 | source = "registry+https://github.com/rust-lang/crates.io-index" 727 | checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 728 | dependencies = [ 729 | "percent-encoding", 730 | ] 731 | 732 | [[package]] 733 | name = "fslock" 734 | version = "0.2.1" 735 | source = "registry+https://github.com/rust-lang/crates.io-index" 736 | checksum = "04412b8935272e3a9bae6f48c7bfff74c2911f60525404edfdd28e49884c3bfb" 737 | dependencies = [ 738 | "libc", 739 | "winapi", 740 | ] 741 | 742 | [[package]] 743 | name = "futures" 744 | version = "0.3.31" 745 | source = "registry+https://github.com/rust-lang/crates.io-index" 746 | checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" 747 | dependencies = [ 748 | "futures-channel", 749 | "futures-core", 750 | "futures-executor", 751 | "futures-io", 752 | "futures-sink", 753 | "futures-task", 754 | "futures-util", 755 | ] 756 | 757 | [[package]] 758 | name = "futures-channel" 759 | version = "0.3.31" 760 | source = "registry+https://github.com/rust-lang/crates.io-index" 761 | checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" 762 | dependencies = [ 763 | "futures-core", 764 | "futures-sink", 765 | ] 766 | 767 | [[package]] 768 | name = "futures-core" 769 | version = "0.3.31" 770 | source = "registry+https://github.com/rust-lang/crates.io-index" 771 | checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" 772 | 773 | [[package]] 774 | name = "futures-executor" 775 | version = "0.3.31" 776 | source = "registry+https://github.com/rust-lang/crates.io-index" 777 | checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" 778 | dependencies = [ 779 | "futures-core", 780 | "futures-task", 781 | "futures-util", 782 | ] 783 | 784 | [[package]] 785 | name = "futures-io" 786 | version = "0.3.31" 787 | source = "registry+https://github.com/rust-lang/crates.io-index" 788 | checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" 789 | 790 | [[package]] 791 | name = "futures-macro" 792 | version = "0.3.31" 793 | source = "registry+https://github.com/rust-lang/crates.io-index" 794 | checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" 795 | dependencies = [ 796 | "proc-macro2", 797 | "quote", 798 | "syn", 799 | ] 800 | 801 | [[package]] 802 | name = "futures-sink" 803 | version = "0.3.31" 804 | source = "registry+https://github.com/rust-lang/crates.io-index" 805 | checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" 806 | 807 | [[package]] 808 | name = "futures-task" 809 | version = "0.3.31" 810 | source = "registry+https://github.com/rust-lang/crates.io-index" 811 | checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" 812 | 813 | [[package]] 814 | name = "futures-util" 815 | version = "0.3.31" 816 | source = "registry+https://github.com/rust-lang/crates.io-index" 817 | checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" 818 | dependencies = [ 819 | "futures-channel", 820 | "futures-core", 821 | "futures-io", 822 | "futures-macro", 823 | "futures-sink", 824 | "futures-task", 825 | "memchr", 826 | "pin-project-lite", 827 | "pin-utils", 828 | "slab", 829 | ] 830 | 831 | [[package]] 832 | name = "gimli" 833 | version = "0.31.1" 834 | source = "registry+https://github.com/rust-lang/crates.io-index" 835 | checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" 836 | 837 | [[package]] 838 | name = "glob" 839 | version = "0.3.2" 840 | source = "registry+https://github.com/rust-lang/crates.io-index" 841 | checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" 842 | 843 | [[package]] 844 | name = "gzip-header" 845 | version = "1.0.0" 846 | source = "registry+https://github.com/rust-lang/crates.io-index" 847 | checksum = "95cc527b92e6029a62960ad99aa8a6660faa4555fe5f731aab13aa6a921795a2" 848 | dependencies = [ 849 | "crc32fast", 850 | ] 851 | 852 | [[package]] 853 | name = "h2" 854 | version = "0.3.26" 855 | source = "registry+https://github.com/rust-lang/crates.io-index" 856 | checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" 857 | dependencies = [ 858 | "bytes", 859 | "fnv", 860 | "futures-core", 861 | "futures-sink", 862 | "futures-util", 863 | "http 0.2.12", 864 | "indexmap", 865 | "slab", 866 | "tokio", 867 | "tokio-util 0.7.15", 868 | "tracing", 869 | ] 870 | 871 | [[package]] 872 | name = "hashbrown" 873 | version = "0.15.3" 874 | source = "registry+https://github.com/rust-lang/crates.io-index" 875 | checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" 876 | 877 | [[package]] 878 | name = "heck" 879 | version = "0.5.0" 880 | source = "registry+https://github.com/rust-lang/crates.io-index" 881 | checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 882 | 883 | [[package]] 884 | name = "hex" 885 | version = "0.4.3" 886 | source = "registry+https://github.com/rust-lang/crates.io-index" 887 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 888 | 889 | [[package]] 890 | name = "home" 891 | version = "0.5.11" 892 | source = "registry+https://github.com/rust-lang/crates.io-index" 893 | checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" 894 | dependencies = [ 895 | "windows-sys 0.59.0", 896 | ] 897 | 898 | [[package]] 899 | name = "http" 900 | version = "0.2.12" 901 | source = "registry+https://github.com/rust-lang/crates.io-index" 902 | checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" 903 | dependencies = [ 904 | "bytes", 905 | "fnv", 906 | "itoa 1.0.15", 907 | ] 908 | 909 | [[package]] 910 | name = "http" 911 | version = "1.3.1" 912 | source = "registry+https://github.com/rust-lang/crates.io-index" 913 | checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" 914 | dependencies = [ 915 | "bytes", 916 | "fnv", 917 | "itoa 1.0.15", 918 | ] 919 | 920 | [[package]] 921 | name = "http-body" 922 | version = "0.4.6" 923 | source = "registry+https://github.com/rust-lang/crates.io-index" 924 | checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" 925 | dependencies = [ 926 | "bytes", 927 | "http 0.2.12", 928 | "pin-project-lite", 929 | ] 930 | 931 | [[package]] 932 | name = "http-body" 933 | version = "1.0.1" 934 | source = "registry+https://github.com/rust-lang/crates.io-index" 935 | checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" 936 | dependencies = [ 937 | "bytes", 938 | "http 1.3.1", 939 | ] 940 | 941 | [[package]] 942 | name = "http-body-util" 943 | version = "0.1.3" 944 | source = "registry+https://github.com/rust-lang/crates.io-index" 945 | checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" 946 | dependencies = [ 947 | "bytes", 948 | "futures-core", 949 | "http 1.3.1", 950 | "http-body 1.0.1", 951 | "pin-project-lite", 952 | ] 953 | 954 | [[package]] 955 | name = "httparse" 956 | version = "1.10.1" 957 | source = "registry+https://github.com/rust-lang/crates.io-index" 958 | checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" 959 | 960 | [[package]] 961 | name = "httpdate" 962 | version = "1.0.3" 963 | source = "registry+https://github.com/rust-lang/crates.io-index" 964 | checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" 965 | 966 | [[package]] 967 | name = "hyper" 968 | version = "0.14.32" 969 | source = "registry+https://github.com/rust-lang/crates.io-index" 970 | checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" 971 | dependencies = [ 972 | "bytes", 973 | "futures-channel", 974 | "futures-core", 975 | "futures-util", 976 | "h2", 977 | "http 0.2.12", 978 | "http-body 0.4.6", 979 | "httparse", 980 | "httpdate", 981 | "itoa 1.0.15", 982 | "pin-project-lite", 983 | "socket2", 984 | "tokio", 985 | "tower-service", 986 | "tracing", 987 | "want", 988 | ] 989 | 990 | [[package]] 991 | name = "hyper" 992 | version = "1.6.0" 993 | source = "registry+https://github.com/rust-lang/crates.io-index" 994 | checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" 995 | dependencies = [ 996 | "bytes", 997 | "futures-channel", 998 | "futures-util", 999 | "http 1.3.1", 1000 | "http-body 1.0.1", 1001 | "httparse", 1002 | "httpdate", 1003 | "itoa 1.0.15", 1004 | "pin-project-lite", 1005 | "smallvec", 1006 | "tokio", 1007 | ] 1008 | 1009 | [[package]] 1010 | name = "hyper-rustls" 1011 | version = "0.22.1" 1012 | source = "registry+https://github.com/rust-lang/crates.io-index" 1013 | checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" 1014 | dependencies = [ 1015 | "ct-logs", 1016 | "futures-util", 1017 | "hyper 0.14.32", 1018 | "log", 1019 | "rustls", 1020 | "rustls-native-certs", 1021 | "tokio", 1022 | "tokio-rustls", 1023 | "webpki", 1024 | ] 1025 | 1026 | [[package]] 1027 | name = "hyper-util" 1028 | version = "0.1.11" 1029 | source = "registry+https://github.com/rust-lang/crates.io-index" 1030 | checksum = "497bbc33a26fdd4af9ed9c70d63f61cf56a938375fbb32df34db9b1cd6d643f2" 1031 | dependencies = [ 1032 | "bytes", 1033 | "futures-util", 1034 | "http 1.3.1", 1035 | "http-body 1.0.1", 1036 | "hyper 1.6.0", 1037 | "pin-project-lite", 1038 | "tokio", 1039 | "tower-service", 1040 | ] 1041 | 1042 | [[package]] 1043 | name = "iana-time-zone" 1044 | version = "0.1.63" 1045 | source = "registry+https://github.com/rust-lang/crates.io-index" 1046 | checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" 1047 | dependencies = [ 1048 | "android_system_properties", 1049 | "core-foundation-sys", 1050 | "iana-time-zone-haiku", 1051 | "js-sys", 1052 | "log", 1053 | "wasm-bindgen", 1054 | "windows-core", 1055 | ] 1056 | 1057 | [[package]] 1058 | name = "iana-time-zone-haiku" 1059 | version = "0.1.2" 1060 | source = "registry+https://github.com/rust-lang/crates.io-index" 1061 | checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" 1062 | dependencies = [ 1063 | "cc", 1064 | ] 1065 | 1066 | [[package]] 1067 | name = "indexmap" 1068 | version = "2.9.0" 1069 | source = "registry+https://github.com/rust-lang/crates.io-index" 1070 | checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" 1071 | dependencies = [ 1072 | "equivalent", 1073 | "hashbrown", 1074 | ] 1075 | 1076 | [[package]] 1077 | name = "instant" 1078 | version = "0.1.13" 1079 | source = "registry+https://github.com/rust-lang/crates.io-index" 1080 | checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" 1081 | dependencies = [ 1082 | "cfg-if", 1083 | ] 1084 | 1085 | [[package]] 1086 | name = "is_terminal_polyfill" 1087 | version = "1.70.1" 1088 | source = "registry+https://github.com/rust-lang/crates.io-index" 1089 | checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" 1090 | 1091 | [[package]] 1092 | name = "itertools" 1093 | version = "0.13.0" 1094 | source = "registry+https://github.com/rust-lang/crates.io-index" 1095 | checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" 1096 | dependencies = [ 1097 | "either", 1098 | ] 1099 | 1100 | [[package]] 1101 | name = "itoa" 1102 | version = "0.4.8" 1103 | source = "registry+https://github.com/rust-lang/crates.io-index" 1104 | checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" 1105 | 1106 | [[package]] 1107 | name = "itoa" 1108 | version = "1.0.15" 1109 | source = "registry+https://github.com/rust-lang/crates.io-index" 1110 | checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" 1111 | 1112 | [[package]] 1113 | name = "js-sys" 1114 | version = "0.3.77" 1115 | source = "registry+https://github.com/rust-lang/crates.io-index" 1116 | checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" 1117 | dependencies = [ 1118 | "once_cell", 1119 | "wasm-bindgen", 1120 | ] 1121 | 1122 | [[package]] 1123 | name = "lazy_static" 1124 | version = "1.5.0" 1125 | source = "registry+https://github.com/rust-lang/crates.io-index" 1126 | checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" 1127 | 1128 | [[package]] 1129 | name = "libc" 1130 | version = "0.2.172" 1131 | source = "registry+https://github.com/rust-lang/crates.io-index" 1132 | checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" 1133 | 1134 | [[package]] 1135 | name = "libloading" 1136 | version = "0.8.7" 1137 | source = "registry+https://github.com/rust-lang/crates.io-index" 1138 | checksum = "6a793df0d7afeac54f95b471d3af7f0d4fb975699f972341a4b76988d49cdf0c" 1139 | dependencies = [ 1140 | "cfg-if", 1141 | "windows-targets", 1142 | ] 1143 | 1144 | [[package]] 1145 | name = "linux-raw-sys" 1146 | version = "0.4.15" 1147 | source = "registry+https://github.com/rust-lang/crates.io-index" 1148 | checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" 1149 | 1150 | [[package]] 1151 | name = "log" 1152 | version = "0.4.27" 1153 | source = "registry+https://github.com/rust-lang/crates.io-index" 1154 | checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" 1155 | 1156 | [[package]] 1157 | name = "matchit" 1158 | version = "0.8.4" 1159 | source = "registry+https://github.com/rust-lang/crates.io-index" 1160 | checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" 1161 | 1162 | [[package]] 1163 | name = "md5" 1164 | version = "0.7.0" 1165 | source = "registry+https://github.com/rust-lang/crates.io-index" 1166 | checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" 1167 | 1168 | [[package]] 1169 | name = "memchr" 1170 | version = "2.7.4" 1171 | source = "registry+https://github.com/rust-lang/crates.io-index" 1172 | checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 1173 | 1174 | [[package]] 1175 | name = "mime" 1176 | version = "0.3.17" 1177 | source = "registry+https://github.com/rust-lang/crates.io-index" 1178 | checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 1179 | 1180 | [[package]] 1181 | name = "minimal-lexical" 1182 | version = "0.2.1" 1183 | source = "registry+https://github.com/rust-lang/crates.io-index" 1184 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 1185 | 1186 | [[package]] 1187 | name = "miniz_oxide" 1188 | version = "0.7.4" 1189 | source = "registry+https://github.com/rust-lang/crates.io-index" 1190 | checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" 1191 | dependencies = [ 1192 | "adler", 1193 | ] 1194 | 1195 | [[package]] 1196 | name = "miniz_oxide" 1197 | version = "0.8.8" 1198 | source = "registry+https://github.com/rust-lang/crates.io-index" 1199 | checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" 1200 | dependencies = [ 1201 | "adler2", 1202 | ] 1203 | 1204 | [[package]] 1205 | name = "mio" 1206 | version = "1.0.3" 1207 | source = "registry+https://github.com/rust-lang/crates.io-index" 1208 | checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" 1209 | dependencies = [ 1210 | "libc", 1211 | "wasi", 1212 | "windows-sys 0.52.0", 1213 | ] 1214 | 1215 | [[package]] 1216 | name = "nom" 1217 | version = "7.1.3" 1218 | source = "registry+https://github.com/rust-lang/crates.io-index" 1219 | checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" 1220 | dependencies = [ 1221 | "memchr", 1222 | "minimal-lexical", 1223 | ] 1224 | 1225 | [[package]] 1226 | name = "nu-ansi-term" 1227 | version = "0.46.0" 1228 | source = "registry+https://github.com/rust-lang/crates.io-index" 1229 | checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" 1230 | dependencies = [ 1231 | "overload", 1232 | "winapi", 1233 | ] 1234 | 1235 | [[package]] 1236 | name = "num-conv" 1237 | version = "0.1.0" 1238 | source = "registry+https://github.com/rust-lang/crates.io-index" 1239 | checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" 1240 | 1241 | [[package]] 1242 | name = "num-integer" 1243 | version = "0.1.46" 1244 | source = "registry+https://github.com/rust-lang/crates.io-index" 1245 | checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" 1246 | dependencies = [ 1247 | "num-traits", 1248 | ] 1249 | 1250 | [[package]] 1251 | name = "num-traits" 1252 | version = "0.2.19" 1253 | source = "registry+https://github.com/rust-lang/crates.io-index" 1254 | checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 1255 | dependencies = [ 1256 | "autocfg", 1257 | ] 1258 | 1259 | [[package]] 1260 | name = "object" 1261 | version = "0.36.7" 1262 | source = "registry+https://github.com/rust-lang/crates.io-index" 1263 | checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" 1264 | dependencies = [ 1265 | "memchr", 1266 | ] 1267 | 1268 | [[package]] 1269 | name = "once_cell" 1270 | version = "1.21.3" 1271 | source = "registry+https://github.com/rust-lang/crates.io-index" 1272 | checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" 1273 | 1274 | [[package]] 1275 | name = "openssl-probe" 1276 | version = "0.1.6" 1277 | source = "registry+https://github.com/rust-lang/crates.io-index" 1278 | checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" 1279 | 1280 | [[package]] 1281 | name = "overload" 1282 | version = "0.1.1" 1283 | source = "registry+https://github.com/rust-lang/crates.io-index" 1284 | checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" 1285 | 1286 | [[package]] 1287 | name = "paste" 1288 | version = "1.0.15" 1289 | source = "registry+https://github.com/rust-lang/crates.io-index" 1290 | checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" 1291 | 1292 | [[package]] 1293 | name = "percent-encoding" 1294 | version = "2.3.1" 1295 | source = "registry+https://github.com/rust-lang/crates.io-index" 1296 | checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 1297 | 1298 | [[package]] 1299 | name = "pin-project" 1300 | version = "1.1.10" 1301 | source = "registry+https://github.com/rust-lang/crates.io-index" 1302 | checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" 1303 | dependencies = [ 1304 | "pin-project-internal", 1305 | ] 1306 | 1307 | [[package]] 1308 | name = "pin-project-internal" 1309 | version = "1.1.10" 1310 | source = "registry+https://github.com/rust-lang/crates.io-index" 1311 | checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" 1312 | dependencies = [ 1313 | "proc-macro2", 1314 | "quote", 1315 | "syn", 1316 | ] 1317 | 1318 | [[package]] 1319 | name = "pin-project-lite" 1320 | version = "0.2.16" 1321 | source = "registry+https://github.com/rust-lang/crates.io-index" 1322 | checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" 1323 | 1324 | [[package]] 1325 | name = "pin-utils" 1326 | version = "0.1.0" 1327 | source = "registry+https://github.com/rust-lang/crates.io-index" 1328 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1329 | 1330 | [[package]] 1331 | name = "powerfmt" 1332 | version = "0.2.0" 1333 | source = "registry+https://github.com/rust-lang/crates.io-index" 1334 | checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" 1335 | 1336 | [[package]] 1337 | name = "prettyplease" 1338 | version = "0.2.32" 1339 | source = "registry+https://github.com/rust-lang/crates.io-index" 1340 | checksum = "664ec5419c51e34154eec046ebcba56312d5a2fc3b09a06da188e1ad21afadf6" 1341 | dependencies = [ 1342 | "proc-macro2", 1343 | "syn", 1344 | ] 1345 | 1346 | [[package]] 1347 | name = "proc-macro2" 1348 | version = "1.0.95" 1349 | source = "registry+https://github.com/rust-lang/crates.io-index" 1350 | checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" 1351 | dependencies = [ 1352 | "unicode-ident", 1353 | ] 1354 | 1355 | [[package]] 1356 | name = "quote" 1357 | version = "1.0.40" 1358 | source = "registry+https://github.com/rust-lang/crates.io-index" 1359 | checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" 1360 | dependencies = [ 1361 | "proc-macro2", 1362 | ] 1363 | 1364 | [[package]] 1365 | name = "regex" 1366 | version = "1.11.1" 1367 | source = "registry+https://github.com/rust-lang/crates.io-index" 1368 | checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" 1369 | dependencies = [ 1370 | "aho-corasick", 1371 | "memchr", 1372 | "regex-automata", 1373 | "regex-syntax", 1374 | ] 1375 | 1376 | [[package]] 1377 | name = "regex-automata" 1378 | version = "0.4.9" 1379 | source = "registry+https://github.com/rust-lang/crates.io-index" 1380 | checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" 1381 | dependencies = [ 1382 | "aho-corasick", 1383 | "memchr", 1384 | "regex-syntax", 1385 | ] 1386 | 1387 | [[package]] 1388 | name = "regex-syntax" 1389 | version = "0.8.5" 1390 | source = "registry+https://github.com/rust-lang/crates.io-index" 1391 | checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" 1392 | 1393 | [[package]] 1394 | name = "ring" 1395 | version = "0.16.20" 1396 | source = "registry+https://github.com/rust-lang/crates.io-index" 1397 | checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" 1398 | dependencies = [ 1399 | "cc", 1400 | "libc", 1401 | "once_cell", 1402 | "spin", 1403 | "untrusted", 1404 | "web-sys", 1405 | "winapi", 1406 | ] 1407 | 1408 | [[package]] 1409 | name = "rmcp" 1410 | version = "0.1.5" 1411 | source = "git+https://github.com/modelcontextprotocol/rust-sdk?branch=main#787cc015b719773f66d4ac32e695b9a0079e12ef" 1412 | dependencies = [ 1413 | "base64 0.21.7", 1414 | "chrono", 1415 | "futures", 1416 | "paste", 1417 | "pin-project-lite", 1418 | "rmcp-macros", 1419 | "schemars", 1420 | "serde", 1421 | "serde_json", 1422 | "thiserror 2.0.12", 1423 | "tokio", 1424 | "tokio-util 0.7.15", 1425 | "tracing", 1426 | ] 1427 | 1428 | [[package]] 1429 | name = "rmcp-macros" 1430 | version = "0.1.5" 1431 | source = "git+https://github.com/modelcontextprotocol/rust-sdk?branch=main#787cc015b719773f66d4ac32e695b9a0079e12ef" 1432 | dependencies = [ 1433 | "proc-macro2", 1434 | "quote", 1435 | "syn", 1436 | ] 1437 | 1438 | [[package]] 1439 | name = "rustc-demangle" 1440 | version = "0.1.24" 1441 | source = "registry+https://github.com/rust-lang/crates.io-index" 1442 | checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" 1443 | 1444 | [[package]] 1445 | name = "rustc-hash" 1446 | version = "2.1.1" 1447 | source = "registry+https://github.com/rust-lang/crates.io-index" 1448 | checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" 1449 | 1450 | [[package]] 1451 | name = "rustc_version" 1452 | version = "0.4.1" 1453 | source = "registry+https://github.com/rust-lang/crates.io-index" 1454 | checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" 1455 | dependencies = [ 1456 | "semver", 1457 | ] 1458 | 1459 | [[package]] 1460 | name = "rustix" 1461 | version = "0.38.44" 1462 | source = "registry+https://github.com/rust-lang/crates.io-index" 1463 | checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" 1464 | dependencies = [ 1465 | "bitflags", 1466 | "errno", 1467 | "libc", 1468 | "linux-raw-sys", 1469 | "windows-sys 0.59.0", 1470 | ] 1471 | 1472 | [[package]] 1473 | name = "rustls" 1474 | version = "0.19.1" 1475 | source = "registry+https://github.com/rust-lang/crates.io-index" 1476 | checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" 1477 | dependencies = [ 1478 | "base64 0.13.1", 1479 | "log", 1480 | "ring", 1481 | "sct", 1482 | "webpki", 1483 | ] 1484 | 1485 | [[package]] 1486 | name = "rustls-native-certs" 1487 | version = "0.5.0" 1488 | source = "registry+https://github.com/rust-lang/crates.io-index" 1489 | checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" 1490 | dependencies = [ 1491 | "openssl-probe", 1492 | "rustls", 1493 | "schannel", 1494 | "security-framework", 1495 | ] 1496 | 1497 | [[package]] 1498 | name = "rustversion" 1499 | version = "1.0.20" 1500 | source = "registry+https://github.com/rust-lang/crates.io-index" 1501 | checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" 1502 | 1503 | [[package]] 1504 | name = "ryu" 1505 | version = "1.0.20" 1506 | source = "registry+https://github.com/rust-lang/crates.io-index" 1507 | checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" 1508 | 1509 | [[package]] 1510 | name = "schannel" 1511 | version = "0.1.27" 1512 | source = "registry+https://github.com/rust-lang/crates.io-index" 1513 | checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" 1514 | dependencies = [ 1515 | "windows-sys 0.59.0", 1516 | ] 1517 | 1518 | [[package]] 1519 | name = "schemars" 1520 | version = "0.8.22" 1521 | source = "registry+https://github.com/rust-lang/crates.io-index" 1522 | checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" 1523 | dependencies = [ 1524 | "dyn-clone", 1525 | "schemars_derive", 1526 | "serde", 1527 | "serde_json", 1528 | ] 1529 | 1530 | [[package]] 1531 | name = "schemars_derive" 1532 | version = "0.8.22" 1533 | source = "registry+https://github.com/rust-lang/crates.io-index" 1534 | checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" 1535 | dependencies = [ 1536 | "proc-macro2", 1537 | "quote", 1538 | "serde_derive_internals", 1539 | "syn", 1540 | ] 1541 | 1542 | [[package]] 1543 | name = "sct" 1544 | version = "0.6.1" 1545 | source = "registry+https://github.com/rust-lang/crates.io-index" 1546 | checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" 1547 | dependencies = [ 1548 | "ring", 1549 | "untrusted", 1550 | ] 1551 | 1552 | [[package]] 1553 | name = "security-framework" 1554 | version = "2.11.1" 1555 | source = "registry+https://github.com/rust-lang/crates.io-index" 1556 | checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" 1557 | dependencies = [ 1558 | "bitflags", 1559 | "core-foundation", 1560 | "core-foundation-sys", 1561 | "libc", 1562 | "security-framework-sys", 1563 | ] 1564 | 1565 | [[package]] 1566 | name = "security-framework-sys" 1567 | version = "2.14.0" 1568 | source = "registry+https://github.com/rust-lang/crates.io-index" 1569 | checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" 1570 | dependencies = [ 1571 | "core-foundation-sys", 1572 | "libc", 1573 | ] 1574 | 1575 | [[package]] 1576 | name = "semver" 1577 | version = "1.0.26" 1578 | source = "registry+https://github.com/rust-lang/crates.io-index" 1579 | checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" 1580 | 1581 | [[package]] 1582 | name = "serde" 1583 | version = "1.0.219" 1584 | source = "registry+https://github.com/rust-lang/crates.io-index" 1585 | checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" 1586 | dependencies = [ 1587 | "serde_derive", 1588 | ] 1589 | 1590 | [[package]] 1591 | name = "serde_derive" 1592 | version = "1.0.219" 1593 | source = "registry+https://github.com/rust-lang/crates.io-index" 1594 | checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" 1595 | dependencies = [ 1596 | "proc-macro2", 1597 | "quote", 1598 | "syn", 1599 | ] 1600 | 1601 | [[package]] 1602 | name = "serde_derive_internals" 1603 | version = "0.29.1" 1604 | source = "registry+https://github.com/rust-lang/crates.io-index" 1605 | checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" 1606 | dependencies = [ 1607 | "proc-macro2", 1608 | "quote", 1609 | "syn", 1610 | ] 1611 | 1612 | [[package]] 1613 | name = "serde_json" 1614 | version = "1.0.140" 1615 | source = "registry+https://github.com/rust-lang/crates.io-index" 1616 | checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" 1617 | dependencies = [ 1618 | "itoa 1.0.15", 1619 | "memchr", 1620 | "ryu", 1621 | "serde", 1622 | ] 1623 | 1624 | [[package]] 1625 | name = "serde_path_to_error" 1626 | version = "0.1.17" 1627 | source = "registry+https://github.com/rust-lang/crates.io-index" 1628 | checksum = "59fab13f937fa393d08645bf3a84bdfe86e296747b506ada67bb15f10f218b2a" 1629 | dependencies = [ 1630 | "itoa 1.0.15", 1631 | "serde", 1632 | ] 1633 | 1634 | [[package]] 1635 | name = "serde_urlencoded" 1636 | version = "0.7.1" 1637 | source = "registry+https://github.com/rust-lang/crates.io-index" 1638 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 1639 | dependencies = [ 1640 | "form_urlencoded", 1641 | "itoa 1.0.15", 1642 | "ryu", 1643 | "serde", 1644 | ] 1645 | 1646 | [[package]] 1647 | name = "server" 1648 | version = "0.1.0" 1649 | dependencies = [ 1650 | "anyhow", 1651 | "async-trait", 1652 | "aws-config", 1653 | "aws-sdk-s3", 1654 | "axum", 1655 | "clap", 1656 | "rmcp", 1657 | "serde", 1658 | "serde_json", 1659 | "tokio", 1660 | "tracing", 1661 | "tracing-subscriber", 1662 | "v8", 1663 | ] 1664 | 1665 | [[package]] 1666 | name = "sharded-slab" 1667 | version = "0.1.7" 1668 | source = "registry+https://github.com/rust-lang/crates.io-index" 1669 | checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" 1670 | dependencies = [ 1671 | "lazy_static", 1672 | ] 1673 | 1674 | [[package]] 1675 | name = "shlex" 1676 | version = "1.3.0" 1677 | source = "registry+https://github.com/rust-lang/crates.io-index" 1678 | checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 1679 | 1680 | [[package]] 1681 | name = "slab" 1682 | version = "0.4.9" 1683 | source = "registry+https://github.com/rust-lang/crates.io-index" 1684 | checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" 1685 | dependencies = [ 1686 | "autocfg", 1687 | ] 1688 | 1689 | [[package]] 1690 | name = "smallvec" 1691 | version = "1.15.0" 1692 | source = "registry+https://github.com/rust-lang/crates.io-index" 1693 | checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" 1694 | 1695 | [[package]] 1696 | name = "socket2" 1697 | version = "0.5.9" 1698 | source = "registry+https://github.com/rust-lang/crates.io-index" 1699 | checksum = "4f5fd57c80058a56cf5c777ab8a126398ece8e442983605d280a44ce79d0edef" 1700 | dependencies = [ 1701 | "libc", 1702 | "windows-sys 0.52.0", 1703 | ] 1704 | 1705 | [[package]] 1706 | name = "spin" 1707 | version = "0.5.2" 1708 | source = "registry+https://github.com/rust-lang/crates.io-index" 1709 | checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" 1710 | 1711 | [[package]] 1712 | name = "strsim" 1713 | version = "0.11.1" 1714 | source = "registry+https://github.com/rust-lang/crates.io-index" 1715 | checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" 1716 | 1717 | [[package]] 1718 | name = "syn" 1719 | version = "2.0.101" 1720 | source = "registry+https://github.com/rust-lang/crates.io-index" 1721 | checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" 1722 | dependencies = [ 1723 | "proc-macro2", 1724 | "quote", 1725 | "unicode-ident", 1726 | ] 1727 | 1728 | [[package]] 1729 | name = "sync_wrapper" 1730 | version = "1.0.2" 1731 | source = "registry+https://github.com/rust-lang/crates.io-index" 1732 | checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" 1733 | 1734 | [[package]] 1735 | name = "thiserror" 1736 | version = "1.0.69" 1737 | source = "registry+https://github.com/rust-lang/crates.io-index" 1738 | checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" 1739 | dependencies = [ 1740 | "thiserror-impl 1.0.69", 1741 | ] 1742 | 1743 | [[package]] 1744 | name = "thiserror" 1745 | version = "2.0.12" 1746 | source = "registry+https://github.com/rust-lang/crates.io-index" 1747 | checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" 1748 | dependencies = [ 1749 | "thiserror-impl 2.0.12", 1750 | ] 1751 | 1752 | [[package]] 1753 | name = "thiserror-impl" 1754 | version = "1.0.69" 1755 | source = "registry+https://github.com/rust-lang/crates.io-index" 1756 | checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" 1757 | dependencies = [ 1758 | "proc-macro2", 1759 | "quote", 1760 | "syn", 1761 | ] 1762 | 1763 | [[package]] 1764 | name = "thiserror-impl" 1765 | version = "2.0.12" 1766 | source = "registry+https://github.com/rust-lang/crates.io-index" 1767 | checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" 1768 | dependencies = [ 1769 | "proc-macro2", 1770 | "quote", 1771 | "syn", 1772 | ] 1773 | 1774 | [[package]] 1775 | name = "thread_local" 1776 | version = "1.1.8" 1777 | source = "registry+https://github.com/rust-lang/crates.io-index" 1778 | checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" 1779 | dependencies = [ 1780 | "cfg-if", 1781 | "once_cell", 1782 | ] 1783 | 1784 | [[package]] 1785 | name = "time" 1786 | version = "0.3.41" 1787 | source = "registry+https://github.com/rust-lang/crates.io-index" 1788 | checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" 1789 | dependencies = [ 1790 | "deranged", 1791 | "num-conv", 1792 | "powerfmt", 1793 | "serde", 1794 | "time-core", 1795 | "time-macros", 1796 | ] 1797 | 1798 | [[package]] 1799 | name = "time-core" 1800 | version = "0.1.4" 1801 | source = "registry+https://github.com/rust-lang/crates.io-index" 1802 | checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" 1803 | 1804 | [[package]] 1805 | name = "time-macros" 1806 | version = "0.2.22" 1807 | source = "registry+https://github.com/rust-lang/crates.io-index" 1808 | checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" 1809 | dependencies = [ 1810 | "num-conv", 1811 | "time-core", 1812 | ] 1813 | 1814 | [[package]] 1815 | name = "tokio" 1816 | version = "1.45.0" 1817 | source = "registry+https://github.com/rust-lang/crates.io-index" 1818 | checksum = "2513ca694ef9ede0fb23fe71a4ee4107cb102b9dc1930f6d0fd77aae068ae165" 1819 | dependencies = [ 1820 | "backtrace", 1821 | "bytes", 1822 | "libc", 1823 | "mio", 1824 | "pin-project-lite", 1825 | "socket2", 1826 | "tokio-macros", 1827 | "windows-sys 0.52.0", 1828 | ] 1829 | 1830 | [[package]] 1831 | name = "tokio-macros" 1832 | version = "2.5.0" 1833 | source = "registry+https://github.com/rust-lang/crates.io-index" 1834 | checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" 1835 | dependencies = [ 1836 | "proc-macro2", 1837 | "quote", 1838 | "syn", 1839 | ] 1840 | 1841 | [[package]] 1842 | name = "tokio-rustls" 1843 | version = "0.22.0" 1844 | source = "registry+https://github.com/rust-lang/crates.io-index" 1845 | checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" 1846 | dependencies = [ 1847 | "rustls", 1848 | "tokio", 1849 | "webpki", 1850 | ] 1851 | 1852 | [[package]] 1853 | name = "tokio-util" 1854 | version = "0.6.10" 1855 | source = "registry+https://github.com/rust-lang/crates.io-index" 1856 | checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" 1857 | dependencies = [ 1858 | "bytes", 1859 | "futures-core", 1860 | "futures-sink", 1861 | "log", 1862 | "pin-project-lite", 1863 | "tokio", 1864 | ] 1865 | 1866 | [[package]] 1867 | name = "tokio-util" 1868 | version = "0.7.15" 1869 | source = "registry+https://github.com/rust-lang/crates.io-index" 1870 | checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" 1871 | dependencies = [ 1872 | "bytes", 1873 | "futures-core", 1874 | "futures-sink", 1875 | "pin-project-lite", 1876 | "tokio", 1877 | ] 1878 | 1879 | [[package]] 1880 | name = "tower" 1881 | version = "0.4.13" 1882 | source = "registry+https://github.com/rust-lang/crates.io-index" 1883 | checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" 1884 | dependencies = [ 1885 | "futures-core", 1886 | "futures-util", 1887 | "pin-project", 1888 | "pin-project-lite", 1889 | "tokio", 1890 | "tower-layer", 1891 | "tower-service", 1892 | "tracing", 1893 | ] 1894 | 1895 | [[package]] 1896 | name = "tower" 1897 | version = "0.5.2" 1898 | source = "registry+https://github.com/rust-lang/crates.io-index" 1899 | checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" 1900 | dependencies = [ 1901 | "futures-core", 1902 | "futures-util", 1903 | "pin-project-lite", 1904 | "sync_wrapper", 1905 | "tokio", 1906 | "tower-layer", 1907 | "tower-service", 1908 | "tracing", 1909 | ] 1910 | 1911 | [[package]] 1912 | name = "tower-layer" 1913 | version = "0.3.3" 1914 | source = "registry+https://github.com/rust-lang/crates.io-index" 1915 | checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" 1916 | 1917 | [[package]] 1918 | name = "tower-service" 1919 | version = "0.3.3" 1920 | source = "registry+https://github.com/rust-lang/crates.io-index" 1921 | checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" 1922 | 1923 | [[package]] 1924 | name = "tracing" 1925 | version = "0.1.41" 1926 | source = "registry+https://github.com/rust-lang/crates.io-index" 1927 | checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" 1928 | dependencies = [ 1929 | "log", 1930 | "pin-project-lite", 1931 | "tracing-attributes", 1932 | "tracing-core", 1933 | ] 1934 | 1935 | [[package]] 1936 | name = "tracing-attributes" 1937 | version = "0.1.28" 1938 | source = "registry+https://github.com/rust-lang/crates.io-index" 1939 | checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" 1940 | dependencies = [ 1941 | "proc-macro2", 1942 | "quote", 1943 | "syn", 1944 | ] 1945 | 1946 | [[package]] 1947 | name = "tracing-core" 1948 | version = "0.1.33" 1949 | source = "registry+https://github.com/rust-lang/crates.io-index" 1950 | checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" 1951 | dependencies = [ 1952 | "once_cell", 1953 | "valuable", 1954 | ] 1955 | 1956 | [[package]] 1957 | name = "tracing-log" 1958 | version = "0.2.0" 1959 | source = "registry+https://github.com/rust-lang/crates.io-index" 1960 | checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" 1961 | dependencies = [ 1962 | "log", 1963 | "once_cell", 1964 | "tracing-core", 1965 | ] 1966 | 1967 | [[package]] 1968 | name = "tracing-subscriber" 1969 | version = "0.3.19" 1970 | source = "registry+https://github.com/rust-lang/crates.io-index" 1971 | checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" 1972 | dependencies = [ 1973 | "nu-ansi-term", 1974 | "sharded-slab", 1975 | "smallvec", 1976 | "thread_local", 1977 | "tracing-core", 1978 | "tracing-log", 1979 | ] 1980 | 1981 | [[package]] 1982 | name = "try-lock" 1983 | version = "0.2.5" 1984 | source = "registry+https://github.com/rust-lang/crates.io-index" 1985 | checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" 1986 | 1987 | [[package]] 1988 | name = "unicode-ident" 1989 | version = "1.0.18" 1990 | source = "registry+https://github.com/rust-lang/crates.io-index" 1991 | checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" 1992 | 1993 | [[package]] 1994 | name = "untrusted" 1995 | version = "0.7.1" 1996 | source = "registry+https://github.com/rust-lang/crates.io-index" 1997 | checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" 1998 | 1999 | [[package]] 2000 | name = "urlencoding" 2001 | version = "1.3.3" 2002 | source = "registry+https://github.com/rust-lang/crates.io-index" 2003 | checksum = "5a1f0175e03a0973cf4afd476bef05c26e228520400eb1fd473ad417b1c00ffb" 2004 | 2005 | [[package]] 2006 | name = "utf8parse" 2007 | version = "0.2.2" 2008 | source = "registry+https://github.com/rust-lang/crates.io-index" 2009 | checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" 2010 | 2011 | [[package]] 2012 | name = "v8" 2013 | version = "136.0.0" 2014 | source = "registry+https://github.com/rust-lang/crates.io-index" 2015 | checksum = "278d906d3513fce0be40e1b28eb4c482f44e9d3bf7c1be880441e706bebf5e43" 2016 | dependencies = [ 2017 | "bindgen", 2018 | "bitflags", 2019 | "fslock", 2020 | "gzip-header", 2021 | "home", 2022 | "miniz_oxide 0.7.4", 2023 | "paste", 2024 | "which", 2025 | ] 2026 | 2027 | [[package]] 2028 | name = "valuable" 2029 | version = "0.1.1" 2030 | source = "registry+https://github.com/rust-lang/crates.io-index" 2031 | checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" 2032 | 2033 | [[package]] 2034 | name = "want" 2035 | version = "0.3.1" 2036 | source = "registry+https://github.com/rust-lang/crates.io-index" 2037 | checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" 2038 | dependencies = [ 2039 | "try-lock", 2040 | ] 2041 | 2042 | [[package]] 2043 | name = "wasi" 2044 | version = "0.11.0+wasi-snapshot-preview1" 2045 | source = "registry+https://github.com/rust-lang/crates.io-index" 2046 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 2047 | 2048 | [[package]] 2049 | name = "wasm-bindgen" 2050 | version = "0.2.100" 2051 | source = "registry+https://github.com/rust-lang/crates.io-index" 2052 | checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" 2053 | dependencies = [ 2054 | "cfg-if", 2055 | "once_cell", 2056 | "rustversion", 2057 | "wasm-bindgen-macro", 2058 | ] 2059 | 2060 | [[package]] 2061 | name = "wasm-bindgen-backend" 2062 | version = "0.2.100" 2063 | source = "registry+https://github.com/rust-lang/crates.io-index" 2064 | checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" 2065 | dependencies = [ 2066 | "bumpalo", 2067 | "log", 2068 | "proc-macro2", 2069 | "quote", 2070 | "syn", 2071 | "wasm-bindgen-shared", 2072 | ] 2073 | 2074 | [[package]] 2075 | name = "wasm-bindgen-macro" 2076 | version = "0.2.100" 2077 | source = "registry+https://github.com/rust-lang/crates.io-index" 2078 | checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" 2079 | dependencies = [ 2080 | "quote", 2081 | "wasm-bindgen-macro-support", 2082 | ] 2083 | 2084 | [[package]] 2085 | name = "wasm-bindgen-macro-support" 2086 | version = "0.2.100" 2087 | source = "registry+https://github.com/rust-lang/crates.io-index" 2088 | checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" 2089 | dependencies = [ 2090 | "proc-macro2", 2091 | "quote", 2092 | "syn", 2093 | "wasm-bindgen-backend", 2094 | "wasm-bindgen-shared", 2095 | ] 2096 | 2097 | [[package]] 2098 | name = "wasm-bindgen-shared" 2099 | version = "0.2.100" 2100 | source = "registry+https://github.com/rust-lang/crates.io-index" 2101 | checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" 2102 | dependencies = [ 2103 | "unicode-ident", 2104 | ] 2105 | 2106 | [[package]] 2107 | name = "web-sys" 2108 | version = "0.3.77" 2109 | source = "registry+https://github.com/rust-lang/crates.io-index" 2110 | checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" 2111 | dependencies = [ 2112 | "js-sys", 2113 | "wasm-bindgen", 2114 | ] 2115 | 2116 | [[package]] 2117 | name = "webpki" 2118 | version = "0.21.4" 2119 | source = "registry+https://github.com/rust-lang/crates.io-index" 2120 | checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" 2121 | dependencies = [ 2122 | "ring", 2123 | "untrusted", 2124 | ] 2125 | 2126 | [[package]] 2127 | name = "which" 2128 | version = "6.0.3" 2129 | source = "registry+https://github.com/rust-lang/crates.io-index" 2130 | checksum = "b4ee928febd44d98f2f459a4a79bd4d928591333a494a10a868418ac1b39cf1f" 2131 | dependencies = [ 2132 | "either", 2133 | "home", 2134 | "rustix", 2135 | "winsafe", 2136 | ] 2137 | 2138 | [[package]] 2139 | name = "winapi" 2140 | version = "0.3.9" 2141 | source = "registry+https://github.com/rust-lang/crates.io-index" 2142 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 2143 | dependencies = [ 2144 | "winapi-i686-pc-windows-gnu", 2145 | "winapi-x86_64-pc-windows-gnu", 2146 | ] 2147 | 2148 | [[package]] 2149 | name = "winapi-i686-pc-windows-gnu" 2150 | version = "0.4.0" 2151 | source = "registry+https://github.com/rust-lang/crates.io-index" 2152 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2153 | 2154 | [[package]] 2155 | name = "winapi-x86_64-pc-windows-gnu" 2156 | version = "0.4.0" 2157 | source = "registry+https://github.com/rust-lang/crates.io-index" 2158 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2159 | 2160 | [[package]] 2161 | name = "windows-core" 2162 | version = "0.61.0" 2163 | source = "registry+https://github.com/rust-lang/crates.io-index" 2164 | checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" 2165 | dependencies = [ 2166 | "windows-implement", 2167 | "windows-interface", 2168 | "windows-link", 2169 | "windows-result", 2170 | "windows-strings", 2171 | ] 2172 | 2173 | [[package]] 2174 | name = "windows-implement" 2175 | version = "0.60.0" 2176 | source = "registry+https://github.com/rust-lang/crates.io-index" 2177 | checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" 2178 | dependencies = [ 2179 | "proc-macro2", 2180 | "quote", 2181 | "syn", 2182 | ] 2183 | 2184 | [[package]] 2185 | name = "windows-interface" 2186 | version = "0.59.1" 2187 | source = "registry+https://github.com/rust-lang/crates.io-index" 2188 | checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" 2189 | dependencies = [ 2190 | "proc-macro2", 2191 | "quote", 2192 | "syn", 2193 | ] 2194 | 2195 | [[package]] 2196 | name = "windows-link" 2197 | version = "0.1.1" 2198 | source = "registry+https://github.com/rust-lang/crates.io-index" 2199 | checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" 2200 | 2201 | [[package]] 2202 | name = "windows-result" 2203 | version = "0.3.2" 2204 | source = "registry+https://github.com/rust-lang/crates.io-index" 2205 | checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" 2206 | dependencies = [ 2207 | "windows-link", 2208 | ] 2209 | 2210 | [[package]] 2211 | name = "windows-strings" 2212 | version = "0.4.0" 2213 | source = "registry+https://github.com/rust-lang/crates.io-index" 2214 | checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97" 2215 | dependencies = [ 2216 | "windows-link", 2217 | ] 2218 | 2219 | [[package]] 2220 | name = "windows-sys" 2221 | version = "0.52.0" 2222 | source = "registry+https://github.com/rust-lang/crates.io-index" 2223 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 2224 | dependencies = [ 2225 | "windows-targets", 2226 | ] 2227 | 2228 | [[package]] 2229 | name = "windows-sys" 2230 | version = "0.59.0" 2231 | source = "registry+https://github.com/rust-lang/crates.io-index" 2232 | checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 2233 | dependencies = [ 2234 | "windows-targets", 2235 | ] 2236 | 2237 | [[package]] 2238 | name = "windows-targets" 2239 | version = "0.52.6" 2240 | source = "registry+https://github.com/rust-lang/crates.io-index" 2241 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 2242 | dependencies = [ 2243 | "windows_aarch64_gnullvm", 2244 | "windows_aarch64_msvc", 2245 | "windows_i686_gnu", 2246 | "windows_i686_gnullvm", 2247 | "windows_i686_msvc", 2248 | "windows_x86_64_gnu", 2249 | "windows_x86_64_gnullvm", 2250 | "windows_x86_64_msvc", 2251 | ] 2252 | 2253 | [[package]] 2254 | name = "windows_aarch64_gnullvm" 2255 | version = "0.52.6" 2256 | source = "registry+https://github.com/rust-lang/crates.io-index" 2257 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 2258 | 2259 | [[package]] 2260 | name = "windows_aarch64_msvc" 2261 | version = "0.52.6" 2262 | source = "registry+https://github.com/rust-lang/crates.io-index" 2263 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 2264 | 2265 | [[package]] 2266 | name = "windows_i686_gnu" 2267 | version = "0.52.6" 2268 | source = "registry+https://github.com/rust-lang/crates.io-index" 2269 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 2270 | 2271 | [[package]] 2272 | name = "windows_i686_gnullvm" 2273 | version = "0.52.6" 2274 | source = "registry+https://github.com/rust-lang/crates.io-index" 2275 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 2276 | 2277 | [[package]] 2278 | name = "windows_i686_msvc" 2279 | version = "0.52.6" 2280 | source = "registry+https://github.com/rust-lang/crates.io-index" 2281 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 2282 | 2283 | [[package]] 2284 | name = "windows_x86_64_gnu" 2285 | version = "0.52.6" 2286 | source = "registry+https://github.com/rust-lang/crates.io-index" 2287 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 2288 | 2289 | [[package]] 2290 | name = "windows_x86_64_gnullvm" 2291 | version = "0.52.6" 2292 | source = "registry+https://github.com/rust-lang/crates.io-index" 2293 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 2294 | 2295 | [[package]] 2296 | name = "windows_x86_64_msvc" 2297 | version = "0.52.6" 2298 | source = "registry+https://github.com/rust-lang/crates.io-index" 2299 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 2300 | 2301 | [[package]] 2302 | name = "winsafe" 2303 | version = "0.0.19" 2304 | source = "registry+https://github.com/rust-lang/crates.io-index" 2305 | checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" 2306 | 2307 | [[package]] 2308 | name = "xmlparser" 2309 | version = "0.13.3" 2310 | source = "registry+https://github.com/rust-lang/crates.io-index" 2311 | checksum = "114ba2b24d2167ef6d67d7d04c8cc86522b87f490025f39f0303b7db5bf5e3d8" 2312 | 2313 | [[package]] 2314 | name = "zeroize" 2315 | version = "1.8.1" 2316 | source = "registry+https://github.com/rust-lang/crates.io-index" 2317 | checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" 2318 | -------------------------------------------------------------------------------- /server/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "server" 3 | version = "0.1.0" 4 | edition = "2024" 5 | 6 | [dependencies] 7 | anyhow = "1.0.98" 8 | axum = "0.8.4" 9 | rmcp = { git = "https://github.com/modelcontextprotocol/rust-sdk", branch = "main", features = ["transport-io"] } 10 | 11 | # rmcp = { version = "0.1.5", } 12 | serde = "1.0.219" 13 | serde_json = "1.0.140" 14 | tokio = { version = "1.45.0", features = ["rt-multi-thread"] } 15 | tracing = "0.1.41" 16 | tracing-subscriber = "0.3.19" 17 | v8 = "136.0.0" 18 | aws-config = "0.0.26-alpha" 19 | aws-sdk-s3 = "0.0.26-alpha" 20 | async-trait = "0.1" 21 | clap = { version = "4.5", features = ["derive"] } -------------------------------------------------------------------------------- /server/src/main.rs: -------------------------------------------------------------------------------- 1 | use anyhow::Result; 2 | use rmcp::{ServiceExt, transport::stdio}; 3 | use tracing_subscriber::{self}; 4 | use clap::Parser; 5 | 6 | mod mcp; 7 | use mcp::{GenericService, initialize_v8}; 8 | use mcp::heap_storage::{AnyHeapStorage, S3HeapStorage, FileHeapStorage}; 9 | 10 | /// Command line arguments for configuring heap storage 11 | #[derive(Parser, Debug)] 12 | #[command(author, version, about, long_about = None)] 13 | struct Cli { 14 | 15 | /// S3 bucket name (required if --use-s3) 16 | #[arg(long, conflicts_with = "directory_path")] 17 | s3_bucket: Option, 18 | 19 | /// Directory path for filesystem storage (required if --use-filesystem) 20 | #[arg(long, conflicts_with = "s3_bucket")] 21 | directory_path: Option, 22 | } 23 | 24 | /// npx @modelcontextprotocol/inspector cargo run -p mcp-server-examples --example std_io 25 | #[tokio::main] 26 | async fn main() -> Result<()> { 27 | initialize_v8(); 28 | // Initialize the tracing subscriber with file and stdout logging 29 | tracing_subscriber::fmt() 30 | // .with_env_filter(EnvFilter::from_default_env().add_directive(tracing::Level::DEBUG.into())) 31 | .with_writer(std::io::stderr) 32 | .with_ansi(false) 33 | .init(); 34 | 35 | let cli = Cli::parse(); 36 | 37 | tracing::info!(?cli, "Starting MCP server with CLI arguments"); 38 | 39 | let heap_storage = if let Some(bucket) = cli.s3_bucket { 40 | AnyHeapStorage::S3(S3HeapStorage::new(bucket).await) 41 | } else if let Some(dir) = cli.directory_path { 42 | AnyHeapStorage::File(FileHeapStorage::new(dir)) 43 | } else { 44 | // default to file /tmp/mcp-v8-heaps 45 | AnyHeapStorage::File(FileHeapStorage::new("/tmp/mcp-v8-heaps")) 46 | }; 47 | 48 | 49 | // Create an instance of our counter router 50 | let service = GenericService::new(heap_storage) 51 | .await 52 | .serve(stdio()) 53 | .await 54 | .inspect_err(|e| { 55 | tracing::error!("serving error: {:?}", e); 56 | })?; 57 | 58 | service.waiting().await?; 59 | Ok(()) 60 | } 61 | -------------------------------------------------------------------------------- /server/src/mcp.rs: -------------------------------------------------------------------------------- 1 | use rmcp::{ 2 | model::{ServerCapabilities, ServerInfo}, 3 | 4 | Error as McpError, RoleServer, ServerHandler, model::*, schemars, 5 | service::RequestContext, tool, 6 | }; 7 | use serde_json::json; 8 | 9 | 10 | use std::sync::Once; 11 | use v8::{self}; 12 | 13 | pub(crate) mod heap_storage; 14 | use crate::mcp::heap_storage::{HeapStorage, AnyHeapStorage}; 15 | 16 | 17 | 18 | 19 | fn eval<'s>(scope: &mut v8::HandleScope<'s>, code: &str) -> Result, String> { 20 | let scope = &mut v8::EscapableHandleScope::new(scope); 21 | let source = v8::String::new(scope, code).ok_or("Failed to create V8 string")?; 22 | let script = v8::Script::compile(scope, source, None).ok_or("Failed to compile script")?; 23 | let r = script.run(scope).ok_or("Failed to run script")?; 24 | Ok(scope.escape(r)) 25 | } 26 | 27 | static INIT: Once = Once::new(); 28 | static mut PLATFORM: Option> = None; 29 | 30 | pub fn initialize_v8() { 31 | INIT.call_once(|| { 32 | let platform = v8::new_default_platform(0, false).make_shared(); 33 | v8::V8::initialize_platform(platform.clone()); 34 | v8::V8::initialize(); 35 | unsafe { 36 | PLATFORM = Some(platform); 37 | } 38 | }); 39 | } 40 | 41 | 42 | 43 | #[allow(dead_code)] 44 | pub trait DataService: Send + Sync + 'static { 45 | fn get_data(&self) -> String; 46 | fn set_data(&mut self, data: String); 47 | } 48 | 49 | #[derive(Clone)] 50 | pub struct GenericService { 51 | heap_storage: AnyHeapStorage, 52 | } 53 | 54 | // response to run_js 55 | #[derive(Debug, Clone)] 56 | pub struct RunJsResponse { 57 | pub output: String, 58 | pub heap: String, 59 | } 60 | 61 | impl IntoContents for RunJsResponse { 62 | fn into_contents(self) -> Vec { 63 | match Content::json(json!({ 64 | "output": self.output, 65 | "heap": self.heap, 66 | })) { 67 | Ok(content) => vec![content], 68 | Err(e) => vec![Content::text(format!("Failed to convert run_js response to content: {}", e))], 69 | } 70 | } 71 | } 72 | 73 | #[tool(tool_box)] 74 | impl GenericService { 75 | pub async fn new( 76 | heap_storage: AnyHeapStorage, 77 | ) -> Self { 78 | Self { 79 | heap_storage, 80 | } 81 | } 82 | 83 | #[tool(description = "run javascript code in v8\n\nparams:\n- code: the javascript code to run\n- heap: the path to the heap file\n\nreturns:\n- output: the output of the javascript code\n- heap: the path to the heap file\n\nyou must send a heap file to the client. \n\n\nThe way the runtime works, is that there is no console.log. If you want the results of an execution, you must return it in the last line of code. \n\neg:\n\n```js\nconst result = 1 + 1;\nresult;\n```\n\nwould return:\n\n```\n2\n```\n\n")] 84 | pub async fn run_js(&self, #[tool(param)] code: String, #[tool(param)] heap: String) -> RunJsResponse { 85 | let snapshot = self.heap_storage.get(&heap).await.ok(); 86 | let code_clone = code.clone(); 87 | let v8_result = tokio::task::spawn_blocking(move || { 88 | let mut snapshot_creator = match snapshot { 89 | Some(snapshot) => { 90 | eprintln!("creating isolate from snapshot..."); 91 | v8::Isolate::snapshot_creator_from_existing_snapshot(snapshot, None, None) 92 | } 93 | None => { 94 | eprintln!("snapshot not found, creating new isolate..."); 95 | v8::Isolate::snapshot_creator(Default::default(), Default::default()) 96 | } 97 | }; 98 | // Always call create_blob before dropping snapshot_creator 99 | let mut output_result: Result = Err("Unknown error".to_string()); 100 | { 101 | let scope = &mut v8::HandleScope::new(&mut snapshot_creator); 102 | let context = v8::Context::new(scope, Default::default()); 103 | let scope = &mut v8::ContextScope::new(scope, context); 104 | let result = eval(scope, &code_clone); 105 | match result { 106 | Ok(result) => { 107 | let result_str = result 108 | .to_string(scope) 109 | .ok_or_else(|| "Failed to convert result to string".to_string()); 110 | match result_str { 111 | Ok(s) => { 112 | output_result = Ok(s.to_rust_string_lossy(scope)); 113 | } 114 | Err(e) => { 115 | output_result = Err(e); 116 | } 117 | } 118 | } 119 | Err(e) => { 120 | output_result = Err(e); 121 | } 122 | } 123 | scope.set_default_context(context); 124 | } 125 | // Always call create_blob before returning 126 | let startup_data = match snapshot_creator.create_blob(v8::FunctionCodeHandling::Clear) { 127 | Some(blob) => blob, 128 | None => return Ok::<_, std::convert::Infallible>((format!("V8 error: Failed to create V8 snapshot blob"), vec![])), 129 | }; 130 | let startup_data_vec = startup_data.to_vec(); 131 | match output_result { 132 | Ok(output) => Ok::<_, std::convert::Infallible>((output, startup_data_vec)), 133 | Err(e) => Ok::<_, std::convert::Infallible>((format!("V8 error: {}", e), startup_data_vec)), 134 | } 135 | }).await; 136 | match v8_result { 137 | Ok(Ok((output, startup_data))) => { 138 | if let Err(e) = self.heap_storage.put(&heap, &startup_data).await { 139 | return RunJsResponse { 140 | output: format!("Error saving heap: {}", e), 141 | heap, 142 | }; 143 | } 144 | RunJsResponse { output, heap } 145 | } 146 | Ok(Err(e)) => RunJsResponse { 147 | output: format!("V8 error: {}", e), 148 | heap, 149 | }, 150 | Err(e) => RunJsResponse { 151 | output: format!("Task join error: {}", e), 152 | heap, 153 | }, 154 | } 155 | } 156 | 157 | 158 | } 159 | 160 | #[tool(tool_box)] 161 | impl ServerHandler for GenericService { 162 | fn get_info(&self) -> ServerInfo { 163 | ServerInfo { 164 | instructions: Some("generic data service".into()), 165 | capabilities: ServerCapabilities::builder().enable_tools().build(), 166 | ..Default::default() 167 | } 168 | } 169 | 170 | 171 | async fn initialize( 172 | &self, 173 | _request: InitializeRequestParam, 174 | context: RequestContext, 175 | ) -> Result { 176 | if let Some(http_request_part) = context.extensions.get::() { 177 | let initialize_headers = &http_request_part.headers; 178 | let initialize_uri = &http_request_part.uri; 179 | tracing::info!(?initialize_headers, %initialize_uri, "initialize from http server"); 180 | } 181 | Ok(self.get_info()) 182 | } 183 | } -------------------------------------------------------------------------------- /server/src/mcp/heap_storage.rs: -------------------------------------------------------------------------------- 1 | use std::path::PathBuf; 2 | use aws_sdk_s3::Client as S3Client; 3 | use aws_sdk_s3::ByteStream; 4 | 5 | use aws_config; 6 | use std::sync::Arc; 7 | use async_trait::async_trait; 8 | 9 | #[async_trait] 10 | pub trait HeapStorage: Send + Sync + 'static { 11 | async fn put(&self, name: &str, data: &[u8]) -> Result<(), String>; 12 | async fn get(&self, name: &str) -> Result, String>; 13 | } 14 | 15 | #[derive(Clone)] 16 | pub struct FileHeapStorage { 17 | dir: PathBuf, 18 | } 19 | 20 | impl FileHeapStorage { 21 | 22 | // ignore dead_code warning 23 | #[allow(dead_code)] 24 | pub fn new(dir: impl Into) -> Self { 25 | let dir = dir.into(); 26 | std::fs::create_dir_all(&dir).ok(); 27 | Self { dir } 28 | } 29 | } 30 | 31 | #[async_trait] 32 | impl HeapStorage for FileHeapStorage { 33 | async fn put(&self, name: &str, data: &[u8]) -> Result<(), String> { 34 | let path = self.dir.join(name); 35 | std::fs::write(path, data).map_err(|e| e.to_string()) 36 | } 37 | async fn get(&self, name: &str) -> Result, String> { 38 | let path = self.dir.join(name); 39 | std::fs::read(path).map_err(|e| e.to_string()) 40 | } 41 | } 42 | 43 | #[derive(Clone)] 44 | pub struct S3HeapStorage { 45 | bucket: String, 46 | client: Arc, 47 | } 48 | 49 | impl S3HeapStorage { 50 | pub async fn new(bucket: impl Into) -> Self { 51 | let config = aws_config::load_from_env().await; 52 | let client = S3Client::new(&config); 53 | Self { 54 | bucket: bucket.into(), 55 | client: Arc::new(client), 56 | } 57 | } 58 | 59 | async fn put_blocking(&self, name: &str, data: &[u8]) -> Result<(), String> { 60 | let client = self.client.clone(); 61 | let bucket = self.bucket.clone(); 62 | let name = name.to_string(); 63 | let data = data.to_vec(); 64 | client 65 | .put_object() 66 | .bucket(bucket) 67 | .key(name) 68 | .body(ByteStream::from(data)) 69 | .send() 70 | .await 71 | .map(|_| ()) 72 | .map_err(|e| e.to_string()) 73 | } 74 | 75 | async fn get_blocking(&self, name: &str) -> Result, String> { 76 | let client = self.client.clone(); 77 | let bucket = self.bucket.clone(); 78 | let name = name.to_string(); 79 | let output = client 80 | .get_object() 81 | .bucket(bucket) 82 | .key(name) 83 | .send() 84 | .await 85 | .map_err(|e| e.to_string())?; 86 | let data = output.body.collect().await.map_err(|e| e.to_string())?; 87 | Ok(data.into_bytes().to_vec()) 88 | } 89 | } 90 | 91 | #[async_trait] 92 | impl HeapStorage for S3HeapStorage { 93 | async fn put(&self, name: &str, data: &[u8]) -> Result<(), String> { 94 | self.put_blocking(name, data).await 95 | } 96 | async fn get(&self, name: &str) -> Result, String> { 97 | self.get_blocking(name).await 98 | } 99 | } 100 | 101 | #[derive(Clone)] 102 | pub enum AnyHeapStorage { 103 | #[allow(dead_code)] 104 | File(FileHeapStorage), 105 | S3(S3HeapStorage), 106 | } 107 | 108 | 109 | 110 | 111 | #[async_trait::async_trait] 112 | impl HeapStorage for AnyHeapStorage { 113 | async fn put(&self, name: &str, data: &[u8]) -> Result<(), String> { 114 | match self { 115 | AnyHeapStorage::File(inner) => inner.put(name, data).await, 116 | AnyHeapStorage::S3(inner) => inner.put(name, data).await, 117 | } 118 | } 119 | async fn get(&self, name: &str) -> Result, String> { 120 | match self { 121 | AnyHeapStorage::File(inner) => inner.get(name).await, 122 | AnyHeapStorage::S3(inner) => inner.get(name).await, 123 | } 124 | } 125 | } -------------------------------------------------------------------------------- /shell.nix: -------------------------------------------------------------------------------- 1 | { pkgs ? import {} }: 2 | pkgs.mkShell rec { 3 | buildInputs = with pkgs; [ 4 | clang 5 | # Replace llvmPackages with llvmPackages_X, where X is the latest LLVM version (at the time of writing, 16) 6 | llvmPackages.bintools 7 | rustup 8 | deno 9 | cacert 10 | ]; 11 | RUSTC_VERSION = pkgs.lib.readFile ./rust-toolchain; 12 | # https://github.com/rust-lang/rust-bindgen#environment-variables 13 | LIBCLANG_PATH = pkgs.lib.makeLibraryPath [ pkgs.llvmPackages_latest.libclang.lib ]; 14 | shellHook = '' 15 | export PATH=$PATH:''${CARGO_HOME:-~/.cargo}/bin 16 | export PATH=$PATH:''${RUSTUP_HOME:-~/.rustup}/toolchains/$RUSTC_VERSION-x86_64-unknown-linux-gnu/bin/ 17 | # Set SSL certificate path 18 | export SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt 19 | ''; 20 | # Add precompiled library to rustc search path 21 | RUSTFLAGS = (builtins.map (a: ''-L ${a}/lib'') [ 22 | # add libraries here (e.g. pkgs.libvmi) 23 | ]); 24 | 25 | 26 | } -------------------------------------------------------------------------------- /snapshot/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 4 4 | 5 | [[package]] 6 | name = "adler" 7 | version = "1.0.2" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 10 | 11 | [[package]] 12 | name = "aho-corasick" 13 | version = "1.1.3" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" 16 | dependencies = [ 17 | "memchr", 18 | ] 19 | 20 | [[package]] 21 | name = "bindgen" 22 | version = "0.71.1" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" 25 | dependencies = [ 26 | "bitflags", 27 | "cexpr", 28 | "clang-sys", 29 | "itertools", 30 | "log", 31 | "prettyplease", 32 | "proc-macro2", 33 | "quote", 34 | "regex", 35 | "rustc-hash", 36 | "shlex", 37 | "syn", 38 | ] 39 | 40 | [[package]] 41 | name = "bitflags" 42 | version = "2.9.0" 43 | source = "registry+https://github.com/rust-lang/crates.io-index" 44 | checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" 45 | 46 | [[package]] 47 | name = "cexpr" 48 | version = "0.6.0" 49 | source = "registry+https://github.com/rust-lang/crates.io-index" 50 | checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" 51 | dependencies = [ 52 | "nom", 53 | ] 54 | 55 | [[package]] 56 | name = "cfg-if" 57 | version = "1.0.0" 58 | source = "registry+https://github.com/rust-lang/crates.io-index" 59 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 60 | 61 | [[package]] 62 | name = "clang-sys" 63 | version = "1.8.1" 64 | source = "registry+https://github.com/rust-lang/crates.io-index" 65 | checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" 66 | dependencies = [ 67 | "glob", 68 | "libc", 69 | "libloading", 70 | ] 71 | 72 | [[package]] 73 | name = "crc32fast" 74 | version = "1.4.2" 75 | source = "registry+https://github.com/rust-lang/crates.io-index" 76 | checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" 77 | dependencies = [ 78 | "cfg-if", 79 | ] 80 | 81 | [[package]] 82 | name = "either" 83 | version = "1.15.0" 84 | source = "registry+https://github.com/rust-lang/crates.io-index" 85 | checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" 86 | 87 | [[package]] 88 | name = "env_logger" 89 | version = "0.10.2" 90 | source = "registry+https://github.com/rust-lang/crates.io-index" 91 | checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" 92 | dependencies = [ 93 | "humantime", 94 | "is-terminal", 95 | "log", 96 | "regex", 97 | "termcolor", 98 | ] 99 | 100 | [[package]] 101 | name = "errno" 102 | version = "0.3.11" 103 | source = "registry+https://github.com/rust-lang/crates.io-index" 104 | checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" 105 | dependencies = [ 106 | "libc", 107 | "windows-sys", 108 | ] 109 | 110 | [[package]] 111 | name = "fslock" 112 | version = "0.2.1" 113 | source = "registry+https://github.com/rust-lang/crates.io-index" 114 | checksum = "04412b8935272e3a9bae6f48c7bfff74c2911f60525404edfdd28e49884c3bfb" 115 | dependencies = [ 116 | "libc", 117 | "winapi", 118 | ] 119 | 120 | [[package]] 121 | name = "glob" 122 | version = "0.3.2" 123 | source = "registry+https://github.com/rust-lang/crates.io-index" 124 | checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" 125 | 126 | [[package]] 127 | name = "gzip-header" 128 | version = "1.0.0" 129 | source = "registry+https://github.com/rust-lang/crates.io-index" 130 | checksum = "95cc527b92e6029a62960ad99aa8a6660faa4555fe5f731aab13aa6a921795a2" 131 | dependencies = [ 132 | "crc32fast", 133 | ] 134 | 135 | [[package]] 136 | name = "hermit-abi" 137 | version = "0.5.0" 138 | source = "registry+https://github.com/rust-lang/crates.io-index" 139 | checksum = "fbd780fe5cc30f81464441920d82ac8740e2e46b29a6fad543ddd075229ce37e" 140 | 141 | [[package]] 142 | name = "home" 143 | version = "0.5.11" 144 | source = "registry+https://github.com/rust-lang/crates.io-index" 145 | checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" 146 | dependencies = [ 147 | "windows-sys", 148 | ] 149 | 150 | [[package]] 151 | name = "humantime" 152 | version = "2.2.0" 153 | source = "registry+https://github.com/rust-lang/crates.io-index" 154 | checksum = "9b112acc8b3adf4b107a8ec20977da0273a8c386765a3ec0229bd500a1443f9f" 155 | 156 | [[package]] 157 | name = "is-terminal" 158 | version = "0.4.16" 159 | source = "registry+https://github.com/rust-lang/crates.io-index" 160 | checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" 161 | dependencies = [ 162 | "hermit-abi", 163 | "libc", 164 | "windows-sys", 165 | ] 166 | 167 | [[package]] 168 | name = "itertools" 169 | version = "0.13.0" 170 | source = "registry+https://github.com/rust-lang/crates.io-index" 171 | checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" 172 | dependencies = [ 173 | "either", 174 | ] 175 | 176 | [[package]] 177 | name = "libc" 178 | version = "0.2.171" 179 | source = "registry+https://github.com/rust-lang/crates.io-index" 180 | checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" 181 | 182 | [[package]] 183 | name = "libloading" 184 | version = "0.8.6" 185 | source = "registry+https://github.com/rust-lang/crates.io-index" 186 | checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" 187 | dependencies = [ 188 | "cfg-if", 189 | "windows-targets", 190 | ] 191 | 192 | [[package]] 193 | name = "linux-raw-sys" 194 | version = "0.4.15" 195 | source = "registry+https://github.com/rust-lang/crates.io-index" 196 | checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" 197 | 198 | [[package]] 199 | name = "log" 200 | version = "0.4.27" 201 | source = "registry+https://github.com/rust-lang/crates.io-index" 202 | checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" 203 | 204 | [[package]] 205 | name = "memchr" 206 | version = "2.7.4" 207 | source = "registry+https://github.com/rust-lang/crates.io-index" 208 | checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 209 | 210 | [[package]] 211 | name = "minimal-lexical" 212 | version = "0.2.1" 213 | source = "registry+https://github.com/rust-lang/crates.io-index" 214 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 215 | 216 | [[package]] 217 | name = "miniz_oxide" 218 | version = "0.7.4" 219 | source = "registry+https://github.com/rust-lang/crates.io-index" 220 | checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" 221 | dependencies = [ 222 | "adler", 223 | ] 224 | 225 | [[package]] 226 | name = "nom" 227 | version = "7.1.3" 228 | source = "registry+https://github.com/rust-lang/crates.io-index" 229 | checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" 230 | dependencies = [ 231 | "memchr", 232 | "minimal-lexical", 233 | ] 234 | 235 | [[package]] 236 | name = "paste" 237 | version = "1.0.15" 238 | source = "registry+https://github.com/rust-lang/crates.io-index" 239 | checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" 240 | 241 | [[package]] 242 | name = "prettyplease" 243 | version = "0.2.32" 244 | source = "registry+https://github.com/rust-lang/crates.io-index" 245 | checksum = "664ec5419c51e34154eec046ebcba56312d5a2fc3b09a06da188e1ad21afadf6" 246 | dependencies = [ 247 | "proc-macro2", 248 | "syn", 249 | ] 250 | 251 | [[package]] 252 | name = "proc-macro2" 253 | version = "1.0.94" 254 | source = "registry+https://github.com/rust-lang/crates.io-index" 255 | checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" 256 | dependencies = [ 257 | "unicode-ident", 258 | ] 259 | 260 | [[package]] 261 | name = "quote" 262 | version = "1.0.40" 263 | source = "registry+https://github.com/rust-lang/crates.io-index" 264 | checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" 265 | dependencies = [ 266 | "proc-macro2", 267 | ] 268 | 269 | [[package]] 270 | name = "regex" 271 | version = "1.11.1" 272 | source = "registry+https://github.com/rust-lang/crates.io-index" 273 | checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" 274 | dependencies = [ 275 | "aho-corasick", 276 | "memchr", 277 | "regex-automata", 278 | "regex-syntax", 279 | ] 280 | 281 | [[package]] 282 | name = "regex-automata" 283 | version = "0.4.9" 284 | source = "registry+https://github.com/rust-lang/crates.io-index" 285 | checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" 286 | dependencies = [ 287 | "aho-corasick", 288 | "memchr", 289 | "regex-syntax", 290 | ] 291 | 292 | [[package]] 293 | name = "regex-syntax" 294 | version = "0.8.5" 295 | source = "registry+https://github.com/rust-lang/crates.io-index" 296 | checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" 297 | 298 | [[package]] 299 | name = "rustc-hash" 300 | version = "2.1.1" 301 | source = "registry+https://github.com/rust-lang/crates.io-index" 302 | checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" 303 | 304 | [[package]] 305 | name = "rustix" 306 | version = "0.38.44" 307 | source = "registry+https://github.com/rust-lang/crates.io-index" 308 | checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" 309 | dependencies = [ 310 | "bitflags", 311 | "errno", 312 | "libc", 313 | "linux-raw-sys", 314 | "windows-sys", 315 | ] 316 | 317 | [[package]] 318 | name = "shlex" 319 | version = "1.3.0" 320 | source = "registry+https://github.com/rust-lang/crates.io-index" 321 | checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 322 | 323 | [[package]] 324 | name = "snapshot" 325 | version = "0.1.0" 326 | dependencies = [ 327 | "env_logger", 328 | "log", 329 | "v8", 330 | ] 331 | 332 | [[package]] 333 | name = "syn" 334 | version = "2.0.100" 335 | source = "registry+https://github.com/rust-lang/crates.io-index" 336 | checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" 337 | dependencies = [ 338 | "proc-macro2", 339 | "quote", 340 | "unicode-ident", 341 | ] 342 | 343 | [[package]] 344 | name = "termcolor" 345 | version = "1.4.1" 346 | source = "registry+https://github.com/rust-lang/crates.io-index" 347 | checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" 348 | dependencies = [ 349 | "winapi-util", 350 | ] 351 | 352 | [[package]] 353 | name = "unicode-ident" 354 | version = "1.0.18" 355 | source = "registry+https://github.com/rust-lang/crates.io-index" 356 | checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" 357 | 358 | [[package]] 359 | name = "v8" 360 | version = "136.0.0" 361 | source = "registry+https://github.com/rust-lang/crates.io-index" 362 | checksum = "278d906d3513fce0be40e1b28eb4c482f44e9d3bf7c1be880441e706bebf5e43" 363 | dependencies = [ 364 | "bindgen", 365 | "bitflags", 366 | "fslock", 367 | "gzip-header", 368 | "home", 369 | "miniz_oxide", 370 | "paste", 371 | "which", 372 | ] 373 | 374 | [[package]] 375 | name = "which" 376 | version = "6.0.3" 377 | source = "registry+https://github.com/rust-lang/crates.io-index" 378 | checksum = "b4ee928febd44d98f2f459a4a79bd4d928591333a494a10a868418ac1b39cf1f" 379 | dependencies = [ 380 | "either", 381 | "home", 382 | "rustix", 383 | "winsafe", 384 | ] 385 | 386 | [[package]] 387 | name = "winapi" 388 | version = "0.3.9" 389 | source = "registry+https://github.com/rust-lang/crates.io-index" 390 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 391 | dependencies = [ 392 | "winapi-i686-pc-windows-gnu", 393 | "winapi-x86_64-pc-windows-gnu", 394 | ] 395 | 396 | [[package]] 397 | name = "winapi-i686-pc-windows-gnu" 398 | version = "0.4.0" 399 | source = "registry+https://github.com/rust-lang/crates.io-index" 400 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 401 | 402 | [[package]] 403 | name = "winapi-util" 404 | version = "0.1.9" 405 | source = "registry+https://github.com/rust-lang/crates.io-index" 406 | checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" 407 | dependencies = [ 408 | "windows-sys", 409 | ] 410 | 411 | [[package]] 412 | name = "winapi-x86_64-pc-windows-gnu" 413 | version = "0.4.0" 414 | source = "registry+https://github.com/rust-lang/crates.io-index" 415 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 416 | 417 | [[package]] 418 | name = "windows-sys" 419 | version = "0.59.0" 420 | source = "registry+https://github.com/rust-lang/crates.io-index" 421 | checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 422 | dependencies = [ 423 | "windows-targets", 424 | ] 425 | 426 | [[package]] 427 | name = "windows-targets" 428 | version = "0.52.6" 429 | source = "registry+https://github.com/rust-lang/crates.io-index" 430 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 431 | dependencies = [ 432 | "windows_aarch64_gnullvm", 433 | "windows_aarch64_msvc", 434 | "windows_i686_gnu", 435 | "windows_i686_gnullvm", 436 | "windows_i686_msvc", 437 | "windows_x86_64_gnu", 438 | "windows_x86_64_gnullvm", 439 | "windows_x86_64_msvc", 440 | ] 441 | 442 | [[package]] 443 | name = "windows_aarch64_gnullvm" 444 | version = "0.52.6" 445 | source = "registry+https://github.com/rust-lang/crates.io-index" 446 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 447 | 448 | [[package]] 449 | name = "windows_aarch64_msvc" 450 | version = "0.52.6" 451 | source = "registry+https://github.com/rust-lang/crates.io-index" 452 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 453 | 454 | [[package]] 455 | name = "windows_i686_gnu" 456 | version = "0.52.6" 457 | source = "registry+https://github.com/rust-lang/crates.io-index" 458 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 459 | 460 | [[package]] 461 | name = "windows_i686_gnullvm" 462 | version = "0.52.6" 463 | source = "registry+https://github.com/rust-lang/crates.io-index" 464 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 465 | 466 | [[package]] 467 | name = "windows_i686_msvc" 468 | version = "0.52.6" 469 | source = "registry+https://github.com/rust-lang/crates.io-index" 470 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 471 | 472 | [[package]] 473 | name = "windows_x86_64_gnu" 474 | version = "0.52.6" 475 | source = "registry+https://github.com/rust-lang/crates.io-index" 476 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 477 | 478 | [[package]] 479 | name = "windows_x86_64_gnullvm" 480 | version = "0.52.6" 481 | source = "registry+https://github.com/rust-lang/crates.io-index" 482 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 483 | 484 | [[package]] 485 | name = "windows_x86_64_msvc" 486 | version = "0.52.6" 487 | source = "registry+https://github.com/rust-lang/crates.io-index" 488 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 489 | 490 | [[package]] 491 | name = "winsafe" 492 | version = "0.0.19" 493 | source = "registry+https://github.com/rust-lang/crates.io-index" 494 | checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" 495 | -------------------------------------------------------------------------------- /snapshot/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "snapshot" 3 | version = "0.1.0" 4 | edition = "2021" 5 | description = "" 6 | 7 | [dependencies] 8 | 9 | env_logger = "0.10" 10 | log = "0.4" 11 | v8 = "136.0.0" 12 | -------------------------------------------------------------------------------- /snapshot/src/main.rs: -------------------------------------------------------------------------------- 1 | use std::io::Write; 2 | 3 | fn eval<'s>(scope: &mut v8::HandleScope<'s>, code: &str) -> Result, String> { 4 | let scope = &mut v8::EscapableHandleScope::new(scope); 5 | let source = v8::String::new(scope, code).ok_or("Failed to create V8 string")?; 6 | let script = v8::Script::compile(scope, source, None).ok_or("Failed to compile script")?; 7 | let r = script.run(scope).ok_or("Failed to run script")?; 8 | Ok(scope.escape(r)) 9 | } 10 | 11 | fn main() { 12 | let platform = v8::new_default_platform(0, false).make_shared(); 13 | v8::V8::initialize_platform(platform); 14 | v8::V8::initialize(); 15 | 16 | // Create snapshot 17 | let startup_data = { 18 | let mut snapshot_creator = match std::fs::read("snapshot.bin") { 19 | Ok(snapshot) => { 20 | eprintln!("creating isolate from snapshot..."); 21 | v8::Isolate::snapshot_creator_from_existing_snapshot(snapshot, None, None) 22 | } 23 | Err(e) => { 24 | if e.kind() == std::io::ErrorKind::NotFound { 25 | eprintln!("snapshot file not found, creating new isolate..."); 26 | v8::Isolate::snapshot_creator(Default::default(), Default::default()) 27 | } else { 28 | eprintln!("error creating isolate: {}", e); 29 | return; 30 | } 31 | } 32 | }; 33 | { 34 | let scope = &mut v8::HandleScope::new(&mut snapshot_creator); 35 | let context = v8::Context::new(scope, Default::default()); 36 | let scope = &mut v8::ContextScope::new(scope, context); 37 | let out = match eval( 38 | scope, 39 | " 40 | try { 41 | x = x + 1 42 | } catch (e) { 43 | x = 1 44 | } 45 | x; 46 | ", 47 | ) { 48 | Ok(val) => val, 49 | Err(e) => { 50 | eprintln!("eval error: {}", e); 51 | return; 52 | } 53 | }; 54 | let out_str = match out.to_string(scope) { 55 | Some(s) => s.to_rust_string_lossy(scope), 56 | None => { 57 | eprintln!("Failed to convert result to string"); 58 | return; 59 | } 60 | }; 61 | eprintln!( 62 | "x = {}", 63 | out_str 64 | ); 65 | scope.set_default_context(context); 66 | } 67 | match snapshot_creator 68 | .create_blob(v8::FunctionCodeHandling::Clear) { 69 | Some(blob) => blob, 70 | None => { 71 | eprintln!("Failed to create V8 snapshot blob"); 72 | return; 73 | } 74 | } 75 | }; 76 | 77 | // Write snapshot to file 78 | eprintln!("snapshot created"); 79 | eprintln!("writing snapshot to file snapshot.bin in current directory"); 80 | let mut file = match std::fs::File::create("snapshot.bin") { 81 | Ok(f) => f, 82 | Err(e) => { 83 | eprintln!("Failed to create snapshot.bin: {}", e); 84 | return; 85 | } 86 | }; 87 | if let Err(e) = file.write_all(&startup_data) { 88 | eprintln!("Failed to write snapshot data: {}", e); 89 | } 90 | } 91 | --------------------------------------------------------------------------------