Skip to content

Latest commit

 

History

History
 
 

README.md

Stride Sources

Build System

All Stride projects import the MSBuild SDK files directly from source. The props import uses GetDirectoryNameOfFileAbove to locate Directory.Build.props without relying on any pre-set property; the targets import uses $(StrideRoot) (set by sources/Directory.Build.props, available by that point in the evaluation). See SDK-GUIDE.md for details.

Three SDK packages are defined in sources/sdk/:

Package Purpose
Stride.Build.Sdk Core SDK for all projects — platform detection, graphics API multi-targeting, assembly processor, dependencies
Stride.Build.Sdk.Editor Additional properties for editor/presentation projects
Stride.Build.Sdk.Tests Test infrastructure — xunit integration, test launcher code generation

For detailed SDK documentation, see SDK-GUIDE.md.

Folders and Projects Layout

core

  • Stride.Core: Reference counting, dependency property system (PropertyContainer/PropertyKey), low-level serialization, low-level memory operations (Utilities and NativeStream).
  • Stride.Core.Mathematics: Mathematics library (despite its name, no dependencies on Stride.Core).
  • Stride.Core.IO: Virtual File System.
  • Stride.Core.Serialization: High-level serialization and git-like CAS storage system.
  • Stride.Core.MicroThreading: Micro-threading library based on C# 5.0 async (a.k.a. stackless programming)
  • Stride.Core.AssemblyProcessor: Internal tool used to patch assemblies to add various features, such as Serialization auto-generation, various memory/pinning operations, module initializers, etc...

presentation

  • Stride.Core.Presentation: WPF UI library (themes, controls such as propertygrid, behaviors, etc...)
  • Stride.Core.Quantum: Advanced ViewModel library that gives ability to synchronize view-models over network (w/ diff), and at requested time intervals. That way, view models can be defined within engine without any UI dependencies.

buildengine

  • Stride.Core.BuildEngine.Common: Common parts of the build engine. It can be reused to add new build steps, build commands, and also to build a new custom build engine client.
  • Stride.Core.BuildEngine: Default implementation of build engine tool (executable)

shader

  • Irony: Parsing library, used by Stride.Core.Shaders. Should later be replaced by ANTLR4.
  • Stride.Core.Shaders: Shader parsing, type analysis and conversion library (used by HLSL->GLSL and Stride Shader Language)
  • Irony.GrammarExplorer: Language syntax tester, you can check how Stride Shading Language (SDSL) works or test newly introduced features

sdk

  • MSBuild SDK packages that provide build logic for all Stride projects. See Build System above.

Use in your project

Source repository

There are two options to integrate this repository in your own repository:

Basic use

Projects import the Stride MSBuild SDK files directly from source:

<Project>
  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Directory.Build.props'))/sdk/Stride.Build.Sdk/Sdk/Sdk.props" />
  <PropertyGroup>
    <TargetFramework>net10.0</TargetFramework>
  </PropertyGroup>
  <Import Project="$(StrideRoot)sources/sdk/Stride.Build.Sdk/Sdk/Sdk.targets" />
</Project>

The props import uses GetDirectoryNameOfFileAbove because $(StrideRoot) is not yet available at that point (it is set by sources/Directory.Build.props, which is discovered during the SDK initialization triggered by the props import itself). The targets import at the bottom uses $(StrideRoot) because Directory.Build.props has been evaluated by then.

Optional: Activate assembly processor

If you want to use auto-generated Serialization code, some of Utilities functions or ModuleInitializer, enable the assembly processor in your project file:

<Project>
  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Directory.Build.props'))/sdk/Stride.Build.Sdk/Sdk/Sdk.props" />
  <PropertyGroup>
    <StrideAssemblyProcessor>true</StrideAssemblyProcessor>
  </PropertyGroup>
  <Import Project="$(StrideRoot)sources/sdk/Stride.Build.Sdk/Sdk/Sdk.targets" />
</Project>