Skip to content

Commit ca65995

Browse files
Move source projects under src/ directory
Relocates Reactor, Reactor.Analyzers, Reactor.Cli, Reactor.Interop.WinForms, Reactor.Localization.Generator, and vscode-reactor under a top-level src/ directory, following standard project convention and separating source from tests/, samples/, and docs/. Updated: - Reactor.sln project paths - ProjectReference paths in 61 consuming .csproj files (tests, samples, docs/apps) - Reactor.Cli.csproj SelfHostDir and SKILL.md resource paths to account for the new depth - .gitignore Rust differ path - README.md, CONTRIBUTING.md, samples/WinFormsInterop/README.md paths - Doc references from `duct` CLI command to actual `mur` binary name in CONTRIBUTING.md, docs/templates/ai-author-skill.md, docs/reference/localization-ci.md, docs/spec/013-doc-system-design.md Verified: dotnet test tests/Reactor.Tests -> 3518 passed, 0 failed, 46 skipped. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5375c98 commit ca65995

436 files changed

Lines changed: 107 additions & 107 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,5 +203,5 @@ health/
203203
selfhost/
204204

205205
# Rust build artifacts
206-
Reactor/Native/differ/target/
206+
src/Reactor/Native/differ/target/
207207
samples/apps/reactorfiles/Native/reactorfs/target/

CONTRIBUTING.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ dotnet restore Reactor.sln
2323
dotnet build Reactor.sln -p:Platform=x64
2424

2525
# Build just the framework
26-
dotnet build Reactor/Reactor.csproj -p:Platform=x64
26+
dotnet build src/Reactor/Reactor.csproj -p:Platform=x64
2727
```
2828

2929
### From Visual Studio
@@ -224,7 +224,7 @@ dotnet run --project samples/Reactor.TestApp -p:Platform=x64
224224
## Project layout
225225

226226
```
227-
Reactor/ Core framework library
227+
src/Reactor/ Core framework library
228228
Core/
229229
Component.cs Base Component class, hook methods
230230
Element.cs 40+ virtual element record types
@@ -262,7 +262,7 @@ Reactor/ Core framework library
262262
reconcile.rs Keyed list reconciliation with LIS
263263
ffi.rs extern "C" FFI entry points
264264
arena.rs Reusable diff context/buffer
265-
Reactor.Cli/ CLI scaffolding tool (duct --create <Name>)
265+
src/Reactor.Cli/ CLI scaffolding tool (mur --create <Name>)
266266
tests/
267267
Reactor.Tests/ 1. Unit tests — xUnit (2,200+ tests, no UI window)
268268
Reactor.AppTests/ 2+3. Test runner — MSTest (orchestrates selfhost + E2E tests)
@@ -279,7 +279,7 @@ samples/
279279

280280
Adding a new WinUI control to Reactor requires changes in four places:
281281

282-
### 1. Define the element record (`Reactor/Core/Element.cs`)
282+
### 1. Define the element record (`src/Reactor/Core/Element.cs`)
283283

284284
```csharp
285285
public record MyControlElement(
@@ -288,14 +288,14 @@ public record MyControlElement(
288288
) : Element;
289289
```
290290

291-
### 2. Add a DSL factory method (`Reactor/Elements/Dsl.cs`)
291+
### 2. Add a DSL factory method (`src/Reactor/Elements/Dsl.cs`)
292292

293293
```csharp
294294
public static MyControlElement MyControl(string label, Action? onClick = null)
295295
=> new(label, onClick);
296296
```
297297

298-
### 3. Add a mount handler (`Reactor/Core/Reconciler.Mount.cs`)
298+
### 3. Add a mount handler (`src/Reactor/Core/Reconciler.Mount.cs`)
299299

300300
```csharp
301301
private FrameworkElement MountMyControl(MyControlElement el)
@@ -313,7 +313,7 @@ private FrameworkElement MountMyControl(MyControlElement el)
313313

314314
Register it in the mount dispatch switch in `Mount()`.
315315

316-
### 4. Add an update handler (`Reactor/Core/Reconciler.Update.cs`)
316+
### 4. Add an update handler (`src/Reactor/Core/Reconciler.Update.cs`)
317317

318318
```csharp
319319
private void UpdateMyControl(WinUI.MyControl control, MyControlElement old, MyControlElement @new)
@@ -325,7 +325,7 @@ private void UpdateMyControl(WinUI.MyControl control, MyControlElement old, MyCo
325325

326326
Register it in the update dispatch switch in `Update()`.
327327

328-
### 5. (Optional) Add modifiers (`Reactor/Elements/ElementExtensions.cs`)
328+
### 5. (Optional) Add modifiers (`src/Reactor/Elements/ElementExtensions.cs`)
329329

330330
If the control has properties that make sense as fluent modifiers, add extension methods.
331331

@@ -335,7 +335,7 @@ Add test cases in `tests/Reactor.Tests/` covering element creation, mount, and u
335335

336336
## How to add a new hook
337337

338-
Hooks live in `Reactor/Core/Component.cs` (public API) and `Reactor/Core/RenderContext.cs` (implementation).
338+
Hooks live in `src/Reactor/Core/Component.cs` (public API) and `src/Reactor/Core/RenderContext.cs` (implementation).
339339

340340
1. Add the hook method to `Component` (delegates to `RenderContext`)
341341
2. Implement the logic in `RenderContext`, using `GetOrCreateHook<T>()` to manage state
@@ -344,19 +344,19 @@ Hooks live in `Reactor/Core/Component.cs` (public API) and `Reactor/Core/RenderC
344344

345345
## Working on the Rust native differ
346346

347-
The differ lives in `Reactor/Native/differ/`. It's a standalone Rust crate that builds as a `cdylib`.
347+
The differ lives in `src/Reactor/Native/differ/`. It's a standalone Rust crate that builds as a `cdylib`.
348348

349349
```bash
350350
# Build the differ directly
351-
cd Reactor/Native/differ
351+
cd src/Reactor/Native/differ
352352
cargo build
353353
cargo test
354354

355355
# Run clippy
356356
cargo clippy
357357
```
358358

359-
The C# interop layer is `Reactor/Native/ViewDiffer.cs`. If you change any struct layouts in `types.rs`, you **must** update the matching C# structs in `ViewDiffer.cs` — there are no compile-time checks across the FFI boundary (see the [code review](docs/viewdiffer-code-review.md) for details).
359+
The C# interop layer is `src/Reactor/Native/ViewDiffer.cs`. If you change any struct layouts in `types.rs`, you **must** update the matching C# structs in `ViewDiffer.cs` — there are no compile-time checks across the FFI boundary (see the [code review](docs/viewdiffer-code-review.md) for details).
360360

361361
Key files:
362362
- `src/types.rs` — wire types shared between Rust and C#

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,15 +214,15 @@ The extension:
214214
## Project structure
215215

216216
```
217-
Reactor/ Core framework
217+
src/Reactor/ Core framework
218218
Core/ Reconciler, components, hooks, elements
219219
Elements/ DSL factory methods + fluent modifiers
220220
Flex/ FlexPanel — CSS Flexbox layout via Yoga engine
221221
Yoga/ Pure C# port of Meta's Yoga layout engine
222222
Hosting/ App bootstrap, render loop, hot reload, preview capture server
223223
Native/ Experimental Rust differ (ViewDiffer)
224-
Reactor.Cli/ CLI scaffolding tool
225-
vscode-reactor/ VS Code extension — live preview panel
224+
src/Reactor.Cli/ CLI scaffolding tool
225+
src/vscode-reactor/ VS Code extension — live preview panel
226226
tests/
227227
Reactor.Tests/ Unit tests — xUnit, 2,200+ tests incl. 590 Yoga layout fixtures
228228
Reactor.AppTests/ Test runner — MSTest, orchestrates selfhost + Appium tests
@@ -238,9 +238,9 @@ samples/
238238

239239
| Doc | Description |
240240
|-----|-------------|
241-
| [Getting Started](Reactor/Docs/GettingStarted.md) | Tutorial — elements, layout, state, components |
242-
| [Architecture](Reactor/Docs/Architecture.md) | Virtual tree, reconciler, hooks, design decisions |
243-
| [Flex Layout Spec](Reactor/Docs/specs/flex-layout.md) | CSS Flexbox via Yoga — FlexPanel design and API |
241+
| [Getting Started](src/Reactor/Docs/GettingStarted.md) | Tutorial — elements, layout, state, components |
242+
| [Architecture](src/Reactor/Docs/Architecture.md) | Virtual tree, reconciler, hooks, design decisions |
243+
| [Flex Layout Spec](src/Reactor/Docs/specs/flex-layout.md) | CSS Flexbox via Yoga — FlexPanel design and API |
244244
| [Contributing](CONTRIBUTING.md) | Build, test, add features, code style |
245245
| [State & Hooks](docs/reference/state-and-hooks.md) | Deep dive on the hook system and reactivity |
246246
| [Reconciliation](docs/reference/reconciliation.md) | How tree diffing works (C# and Rust paths) |

Reactor.sln

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 18
44
VisualStudioVersion = 18.4.11605.240
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reactor", "Reactor\Reactor.csproj", "{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reactor", "src\Reactor\Reactor.csproj", "{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}"
77
EndProject
88
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reactor.Tests", "tests\Reactor.Tests\Reactor.Tests.csproj", "{F81B468C-EF75-4BF9-A7F6-08B716392575}"
99
EndProject
@@ -15,7 +15,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "wordpuzzle", "wordpuzzle",
1515
EndProject
1616
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WordPuzzle", "samples\apps\wordpuzzle\WordPuzzle.csproj", "{10FAAB08-2527-4869-960E-D3AB3600E5C9}"
1717
EndProject
18-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reactor.Cli", "Reactor.Cli\Reactor.Cli.csproj", "{62CDF797-49E4-4226-A710-2568EADF346B}"
18+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reactor.Cli", "src\Reactor.Cli\Reactor.Cli.csproj", "{62CDF797-49E4-4226-A710-2568EADF346B}"
1919
EndProject
2020
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "reactorfiles", "reactorfiles", "{7E6CF6B0-0B2E-9DA2-0313-0F50037052B7}"
2121
EndProject
@@ -61,7 +61,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReactorCharting.Sample", "s
6161
EndProject
6262
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReactorCharting.Tests", "tests\ReactorCharting.Tests\ReactorCharting.Tests.csproj", "{AB5F71EF-1207-43EB-8F2A-CA71B69E9A9D}"
6363
EndProject
64-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reactor.Localization.Generator", "Reactor.Localization.Generator\Reactor.Localization.Generator.csproj", "{668249A5-5FEE-4E78-B52E-9DE59E7F2F44}"
64+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reactor.Localization.Generator", "src\Reactor.Localization.Generator\Reactor.Localization.Generator.csproj", "{668249A5-5FEE-4E78-B52E-9DE59E7F2F44}"
6565
EndProject
6666
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "perf_bench", "perf_bench", "{2268BD01-6EA1-E862-8C11-B8CD1B59120C}"
6767
EndProject
@@ -167,7 +167,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "validation-showcase", "vali
167167
EndProject
168168
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ValidationShowcase", "samples\apps\validation-showcase\ValidationShowcase.csproj", "{2A0A6F22-B477-4DC2-8764-29D86CB8CAB6}"
169169
EndProject
170-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reactor.Analyzers", "Reactor.Analyzers\Reactor.Analyzers.csproj", "{8FA513F7-C65E-4494-9250-CDAF9D12C814}"
170+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reactor.Analyzers", "src\Reactor.Analyzers\Reactor.Analyzers.csproj", "{8FA513F7-C65E-4494-9250-CDAF9D12C814}"
171171
EndProject
172172
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StylingGallery", "samples\StylingGallery\StylingGallery.csproj", "{B0EBF931-A237-4C60-A726-781A98B0119D}"
173173
EndProject
@@ -177,7 +177,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeadTrax", "samples\apps\he
177177
EndProject
178178
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StressPerf.ReactorGrid", "tests\stress_perf\StressPerf.ReactorGrid\StressPerf.ReactorGrid.csproj", "{C40A5F65-286C-401B-A996-47A48D4A84DF}"
179179
EndProject
180-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reactor.Interop.WinForms", "Reactor.Interop.WinForms\Reactor.Interop.WinForms.csproj", "{0C150D1A-0233-4E8B-93D1-ACCB66ABA918}"
180+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reactor.Interop.WinForms", "src\Reactor.Interop.WinForms\Reactor.Interop.WinForms.csproj", "{0C150D1A-0233-4E8B-93D1-ACCB66ABA918}"
181181
EndProject
182182
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinFormsInterop", "samples\WinFormsInterop\WinFormsInterop.csproj", "{098C0749-222B-40A6-9CF9-81C8AF44041B}"
183183
EndProject

docs/apps/accessibility/accessibility.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
<PackageReference Include="Microsoft.WindowsAppSDK" Version="$(WindowsAppSDKVersion)" />
1313
</ItemGroup>
1414
<ItemGroup>
15-
<ProjectReference Include="..\..\..\Reactor\Reactor.csproj" />
15+
<ProjectReference Include="..\..\..\src\Reactor\Reactor.csproj" />
1616
</ItemGroup>
1717
</Project>

docs/apps/advanced/advanced.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
<PackageReference Include="Microsoft.WindowsAppSDK" Version="$(WindowsAppSDKVersion)" />
1313
</ItemGroup>
1414
<ItemGroup>
15-
<ProjectReference Include="..\..\..\Reactor\Reactor.csproj" />
15+
<ProjectReference Include="..\..\..\src\Reactor\Reactor.csproj" />
1616
</ItemGroup>
1717
</Project>

docs/apps/animation/animation.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
<PackageReference Include="Microsoft.WindowsAppSDK" Version="$(WindowsAppSDKVersion)" />
1313
</ItemGroup>
1414
<ItemGroup>
15-
<ProjectReference Include="..\..\..\Reactor\Reactor.csproj" />
15+
<ProjectReference Include="..\..\..\src\Reactor\Reactor.csproj" />
1616
</ItemGroup>
1717
</Project>

docs/apps/calculator/calculator.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
<PackageReference Include="Microsoft.WindowsAppSDK" Version="$(WindowsAppSDKVersion)" />
1313
</ItemGroup>
1414
<ItemGroup>
15-
<ProjectReference Include="..\..\..\Reactor\Reactor.csproj" />
15+
<ProjectReference Include="..\..\..\src\Reactor\Reactor.csproj" />
1616
</ItemGroup>
1717
</Project>

docs/apps/charting/charting.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
<PackageReference Include="Microsoft.WindowsAppSDK" Version="$(WindowsAppSDKVersion)" />
1313
</ItemGroup>
1414
<ItemGroup>
15-
<ProjectReference Include="..\..\..\Reactor\Reactor.csproj" />
15+
<ProjectReference Include="..\..\..\src\Reactor\Reactor.csproj" />
1616
</ItemGroup>
1717
</Project>

docs/apps/collections/collections.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
<PackageReference Include="Microsoft.WindowsAppSDK" Version="$(WindowsAppSDKVersion)" />
1313
</ItemGroup>
1414
<ItemGroup>
15-
<ProjectReference Include="..\..\..\Reactor\Reactor.csproj" />
15+
<ProjectReference Include="..\..\..\src\Reactor\Reactor.csproj" />
1616
</ItemGroup>
1717
</Project>

0 commit comments

Comments
 (0)