23 stable releases
| 1.8.3 | Dec 16, 2025 |
|---|---|
| 1.8.2 | Oct 24, 2025 |
| 1.7.7 | Sep 9, 2025 |
| 1.7.3 | Jun 2, 2025 |
| 1.2.0 | Nov 28, 2024 |
#751 in Rust patterns
Used in edgee-server
500KB
295 lines
Edgee
Edgee SDK Library
Overview
The Edgee SDK Library provides functionality to retrieve and dynamically modify SDK content based on the version specified in the URL. This library includes functions to extract the SDK version from a URL, retrieve the corresponding SDK content, and modify the SDK paths to match the host configuration.
Usage
To retrieve the SDK content from a given URL, use the get_sdk_from_url function. This function takes a URL and a host as arguments and returns the SDK content wrapped in a <script> tag if successful, or an error message if not.
Example
let url = "https://example.com/sdk/v1.1.0.js";
let host = "example.com";
let sdk_content = get_sdk_from_url(url, host);
assert!(sdk_content.is_ok());
Installation
To use this library, add edgee-sdk as a dependency in your Cargo.toml:
[dependencies]
edgee-sdk = "1"
Dependencies
~220–790KB
~18K SLoC