Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ecklf-tmp-runtime-test

Package Overview
Dependencies
Maintainers
1
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ecklf-tmp-runtime-test

```mermaid graph TD A["Lambda Invocation"] --> |"process_request(event: LambdaEvent<VercelEvent>) → ProxyRequest"| B[ProxyRequest] B --> |"handler_fn(req: ProxyRequest) → Future<Output = Result<impl IntoResponse, ProxyError>>"| C

  • 1.0.20
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
201
increased by1910%
Maintainers
1
Weekly downloads
 
Created
Source

Invocation Flowchart

graph TD
    A["Lambda Invocation"] --> |"process_request(event: LambdaEvent<VercelEvent>) → ProxyRequest"| B[ProxyRequest]
    B --> |"handler_fn(req: ProxyRequest) → Future<Output = Result<impl IntoResponse, ProxyError>>"| C["Runtime calls handler_fn"]
    C --> |"Ok(r) => process_response(r)"| D["ProxyResponse"]
    C --> |"Err(e) => process_error(e)"| E["ProxyError"]

What should be in the documentation

# Show `debug` statements in logs
VERCEL_BUILDER_DEBUG=true

Merging Endpoints?

Data structure

  • The Root Cargo.toml is setting up the workspaces for the endpoints.
  • The Endpoints (api/**/main.rs) export a function with the signature: pub async fn handler(_req: ProxyRequest) -> Result<impl IntoResponse, ProxyError>.
 .
├──  api
│  ├──  endpoint_1
│  │  ├──  Cargo.toml
│  │  └──  src
│  │     └──  main.rs
│  └──  endpoint_2
│     ├──  Cargo.toml
│     └──  src
│        └──  main.rs
├──  Cargo.lock
└──  Cargo.toml

Builder

  • Installs the Rust toolchain
  • Injects a pre-defined entry package in the workspace that imports all endpoint handler fn (proc macro) with runtime initialization and routing logic.

Event

[https://github.com/awslabs/aws-lambda-rust-runtime/releases/tag/v0.3.0](Base Lambda Runtime Release Notes)

files: {
  "files": {
    "api/Cargo.lock": {
      "type": "FileFsRef",
      "mode": 33188,
      "fsPath": "/vercel/path0/api/Cargo.lock"
    },
    "api/Cargo.toml": {
      "type": "FileFsRef",
      "mode": 33188,
      "fsPath": "/vercel/path0/api/Cargo.toml"
    },
    "api/user.rs": {
      "type": "FileFsRef",
      "mode": 33188,
      "fsPath": "/vercel/path0/api/user.rs"
    },
    ".vercelignore": {
      "type": "FileFsRef",
      "mode": 33188,
      "fsPath": "/vercel/path0/.vercelignore"
    },
    "package.json": {
      "type": "FileFsRef",
      "mode": 33188,
      "fsPath": "/vercel/path0/package.json"
    },
    "pnpm-lock.yaml": {
      "type": "FileFsRef",
      "mode": 33188,
      "fsPath": "/vercel/path0/pnpm-lock.yaml"
    },
    "vercel.json": {
      "type": "FileFsRef",
      "mode": 33188,
      "fsPath": "/vercel/path0/vercel.json"
    }
  },
  "entrypoint": "api/user.rs",
  "workPath": "/vercel/path0",
  "repoRootPath": "/vercel/path0",
  "config": {
    "zeroConfig": true,
    "functions": {
      "api/**/*.rs": {
        "runtime": "ecklf-tmp-runtime-test@1.0.4"
      }
    },
    "projectSettings": {
      "createdAt": 1674047862614,
      "installCommand": null,
      "buildCommand": null,
      "devCommand": null,
      "outputDirectory": null,
      "rootDirectory": null,
      "framework": null,
      "nodeVersion": "18.x"
    },
    "framework": null,
    "nodeVersion": "18.x"
  },
  "meta": {
    "skipDownload": true,
    "cliVersion": "28.12.7"
  }
}

FAQs

Package last updated on 13 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc