1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! # crawlkit-plugin-sdk
//!
//! SDK for building crawlkit WASM plugins.
//!
//! ## Overview
//!
//! This crate provides the types and traits needed to create custom SEO analyzers
//! that run as WASM plugins in crawlkit's sandboxed environment.
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use crawlkit_plugin_sdk::{Analyzer, Finding, Severity, AnalysisContext};
//!
//! pub struct MyAnalyzer;
//! impl MyAnalyzer { pub fn new() -> Self { Self } }
//!
//! impl Analyzer for MyAnalyzer {
//! fn name(&self) -> &str { "my-analyzer" }
//!
//! fn analyze(&self, ctx: &AnalysisContext) -> Vec<Finding> {
//! let mut findings = Vec::new();
//! if ctx.html.contains("something") {
//! findings.push(Finding {
//! severity: Severity::Warning,
//! category: "custom".into(),
//! code: "CUSTOM001".into(),
//! title: "Something detected".into(),
//! description: "The page contains something".into(),
//! url: ctx.url.clone(),
//! recommendation: "Remove something".into(),
//! });
//! }
//! findings
//! }
//! }
//!
//! // Export for WASM
//! crawlkit_plugin_sdk::export_analyzer!(MyAnalyzer);
//! ```
pub use Analyzer;
pub use AnalysisContext;
pub use ;