This document tracks the split of the simulation engines out of the open-source
CSharpNumerics core into a separate CSharpNumerics.Engines package intended
to live in a private repository and depend on the public CSharpNumerics
NuGet package.
CSharpNumerics is marketed as an open-source (MIT) scientific numerics library.
The simulation engines (Game physics, GIS, Multiphysics, Quantum, Audio,
Exoplanet) were built to sell Unity assets and as commercial productizations.
Splitting them keeps the core focused and open, and keeps the engine source
closed/proprietary. The sole copyright holder may relicense the engine code in
the private repo; MIT on the core permits the engine package to depend on it
without restriction.
- Step 0 — removed all reverse dependencies; core no longer references the engine layer.
- Step 1a —
CSharpNumerics.Enginesproject created (net10.0;net8.0;netstandard2.1,netstandard2.1retained for Unity), engine source moved out of the core project. Core builds independently. - Step 1b — tests split into
NumericTest(core) andNumericTest.Engines. - Step 2 — core package metadata cleaned (engine-only tags removed:
GamePhysics, Audio, Gis, Exoplanets; README engine section removed) and
version bumped to 4.0.0 (breaking: anyone consuming engine types via the
CSharpNumericsNuGet package must switch toCSharpNumerics.Engines).
Neither core nor engines has any external NuGet dependency, so the engine
package will depend only on CSharpNumerics.
These steps publish artifacts or create external repositories. They are intentionally not part of the reviewed diff.
-
Publish core
CSharpNumerics4.0.0 to NuGet.dotnet pack Numerics/Numerics/CSharpNumerics.csproj -c Release dotnet nuget push <CSharpNumerics.4.0.0.nupkg> --source nuget.org --api-key <KEY> -
Create the private repository (e.g.
backlundtransform/CSharpNumerics.Engines) and move these projects into it:CSharpNumerics.Engines/NumericTest.Engines/- a solution + the
LICENSEof your choice (may be proprietary).
-
Swap the engine project's reference from project to package:
<!-- remove --> <ProjectReference Include="..\Numerics\CSharpNumerics.csproj" /> <!-- add --> <PackageReference Include="CSharpNumerics" Version="4.0.0" />
(This cannot build green until step 1 has published the package, which is why it is not done in this PR.)
-
Remove the engine projects from the public repo (follow-up PR): delete
CSharpNumerics.Engines/andNumericTest.Engines/and drop them fromNumerics.sln. Until this is done the engine source remains public in this repo; the split so far is structural only.
NumericTest.Engines/CollisionTests.FullScenario_TwoSpheres_BounceApart fails on
master as well (the two spheres are positioned 3 apart with radii 1 each, so
they do not overlap, yet the test asserts a contact). Left untouched here.