rust

package
v0.3.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package rust implements a gorisk analyzer for Rust projects. It supports Cargo.lock and Cargo.toml.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Detect

func Detect(dir string) capability.CapabilitySet

Detect walks .rs files in dir and returns the combined capability set.

Types

type Adapter

type Adapter struct{}

Adapter implements the analyzer.Analyzer interface for Rust projects.

func (*Adapter) Load

func (a *Adapter) Load(dir string) (*graph.DependencyGraph, error)

Load parses the Rust dependency lockfile in dir, detects capabilities from .rs source files, and returns a *graph.DependencyGraph.

func (*Adapter) Name

func (a *Adapter) Name() string

type RustPackage

type RustPackage struct {
	Name         string
	Version      string
	Dir          string
	Dependencies []string
	Direct       bool
}

RustPackage represents a Rust dependency extracted from a lockfile.

func Load

func Load(dir string) ([]RustPackage, error)

Load detects and parses the Rust dependency lockfile in dir. Detection order: Cargo.lock → Cargo.toml

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL