Skip to main content

Crate unity_solution_generator

Crate unity_solution_generator 

Source
Expand description

Unity Solution Generator core library.

Ported from the Swift SolutionGeneratorCore target.

Re-exports§

pub use defines::generate_version_defines;
pub use defines::parse_scripting_defines;
pub use error::GeneratorError;
pub use error::LockfileError;
pub use error::Result;
pub use lockfile::DllRef;
pub use lockfile::Lockfile;
pub use lockfile::LockfileIO;
pub use lockfile::RefCategory;
pub use lockfile_scanner::LockfileScanner;
pub use paths::DEFAULT_GENERATOR_ROOT;
pub use paths::lockfile_path;
pub use paths::parent_directory;
pub use paths::resolve_project_root;
pub use paths::resolve_real_path;
pub use project_scanner::AsmDefRecord;
pub use project_scanner::ProjectCategory;
pub use project_scanner::ProjectScanner;
pub use project_scanner::ScanResult;
pub use project_scanner::VersionDefine;
pub use solution_generator::BuildConfig;
pub use solution_generator::BuildPlatform;
pub use solution_generator::GenerateOptions;
pub use solution_generator::GenerateResult;
pub use solution_generator::SolutionGenerator;
pub use typecheck::TypecheckOptions;
pub use typecheck::TypecheckResult;

Modules§

defines
error
io
lockfile
lockfile_scanner
Lockfile scanner: walks the Unity installation + project to materialise every DLL reference, analyzer, and define needed for a .csproj.
paths
profile
Per-section profiling. Default-off; opt in by setting USG_PROFILE=1 (concise) or USG_PROFILE=full (verbose, includes child spans). Backed by tracing so external collectors (tracing-tracy, tracing-flame, etc.) can also consume it.
project_scanner
Project-side filesystem scanner.
solution_generator
Renders .csproj / .sln / Directory.Build.props for a platform+config variant. Single entry point driven by csproj.lock.
typecheck
typecheck subcommand — validate compile via direct csc.dll invocation, bypassing MSBuild entirely. See [[architecture.md]] (Typecheck subsystem).
xml

Macros§

section
Open a profiling section. Equivalent to tracing::info_span!(...).entered(), but named for clarity at the call site.

Constants§

CACHE_VERSION
Version of the dev-local cache files (scan-cache, lock-fingerprint, .fingerprints/<hash>). Bumping invalidates ALL three caches wholesale — no migrations. These files are gitignored under Library/, so cold-rebuild on bump is harmless. Cargo / Bazel idiom.
LOCKFILE_VERSION
Version of the user-visible csproj.lock format. Bump only on intentional schema changes; csproj.lock may be checked in, so a bump means consumers re-lock against possibly different Unity installs. See [[architecture.md]].

Functions§

generate
High-level convenience: parse string args + run the full generate pipeline.