Skip to content

Commit d76fb8c

Browse files
committed
Reimplement terminal drivers in a native helper library.
* Implemented a new native helper library, Vezel.Cathode.Native, using Vezel.Zig.Sdk. * Moved all Unix/Win32 interop to the native helper library. * Removed CsWin32 and Unix P/Invoke declarations from Vezel.Cathode. * Removed Vezel.Cathode.Hosting as the native helper library cleans up terminal configuration much more reliably. * Removed Vezel.Cathode.Analyzers since Vezel.Cathode.Hosting was removed. * Lots of cleanup on the C# side as a result of these changes. * Some minor optimizations throughout Vezel.Cathode. Closes #43.
1 parent 69f1c65 commit d76fb8c

Some content is hidden

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

65 files changed

+1399
-1819
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/out
22
*.user
3+
.clangd
34
.idea
45
.vs
56
node_modules

.vscode/extensions.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"github.vscode-github-actions",
99
"github.vscode-pull-request-github",
1010
"jock.svg",
11+
"llvm-vs-code-extensions.vscode-clangd",
1112
"ms-dotnettools.csharp",
1213
"redhat.vscode-xml",
1314
"redhat.vscode-yaml",

.vscode/launch.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"control",
1212
"cursor",
1313
"extensions",
14-
"hosting",
1514
"processes",
1615
"raw",
1716
"resize",

Directory.Build.rsp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
-err
1+
# TODO: https://github.com/ziglang/zig/issues/13385
2+
# TODO: https://github.com/ziglang/zig/issues/15398
3+
#-err
24
-nr:false
35
-tl

Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<Using Include="System.Text" />
2222
</ItemGroup>
2323

24-
<ItemGroup>
24+
<ItemGroup Condition="'$(UsingVezelZigSdk)' != 'true'">
2525
<AdditionalFiles Include="$(MSBuildThisFileDirectory).stylecop.json" />
2626
</ItemGroup>
2727

Directory.Packages.props

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
<ItemGroup>
77
<GlobalPackageReference Include="DotNet.ReproducibleBuilds"
88
Version="1.1.1" />
9+
</ItemGroup>
10+
11+
<ItemGroup Condition="'$(UsingVezelZigSdk)' != 'true'">
912
<GlobalPackageReference Include="Microsoft.VisualStudio.Threading.Analyzers"
1013
Version="17.8.14" />
1114
<GlobalPackageReference Include="Nerdbank.GitVersioning"
@@ -25,12 +28,6 @@
2528
Version="8.0.0" />
2629
<PackageVersion Include="Microsoft.Extensions.Hosting.Systemd"
2730
Version="8.0.0" />
28-
<PackageVersion Include="Microsoft.Windows.CsWin32"
29-
Version="0.3.49-beta" />
30-
<PackageVersion Include="Microsoft.Windows.SDK.Win32Docs"
31-
Version="0.1.42-alpha" />
32-
<PackageVersion Include="Microsoft.Windows.SDK.Win32Metadata"
33-
Version="56.0.13-preview" />
3431
<PackageVersion Include="System.IO.Pipelines"
3532
Version="8.0.0" />
3633
<PackageVersion Include="Wcwidth"

PACKAGE.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ This project offers the following packages:
1414

1515
* [Vezel.Cathode](https://www.nuget.org/packages/Vezel.Cathode): Provides the
1616
core terminal API.
17-
* [Vezel.Cathode.Hosting](https://www.nuget.org/packages/Vezel.Cathode.Hosting):
18-
Provides the terminal hosting model.
1917
* [Vezel.Cathode.Extensions](https://www.nuget.org/packages/Vezel.Cathode.Extensions):
2018
Provides terminal hosting and logging for the .NET Generic Host.
2119

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,15 @@ This project offers the following packages:
4646
| Package | Description | Downloads |
4747
| -: | - | :- |
4848
| [![Vezel.Cathode][core-img]][core-pkg] | Provides the core terminal API. | ![Downloads][core-dls] |
49-
| [![Vezel.Cathode.Hosting][hosting-img]][hosting-pkg] | Provides the terminal hosting model. | ![Downloads][hosting-dls] |
5049
| [![Vezel.Cathode.Extensions][extensions-img]][extensions-pkg] | Provides terminal hosting and logging for the .NET Generic Host. | ![Downloads][extensions-dls] |
5150

5251
[core-pkg]: https://www.nuget.org/packages/Vezel.Cathode
53-
[hosting-pkg]: https://www.nuget.org/packages/Vezel.Cathode.Hosting
5452
[extensions-pkg]: https://www.nuget.org/packages/Vezel.Cathode.Extensions
5553

5654
[core-img]: https://img.shields.io/nuget/v/Vezel.Cathode?label=Vezel.Cathode
57-
[hosting-img]: https://img.shields.io/nuget/v/Vezel.Cathode.Hosting?label=Vezel.Cathode.Hosting
5855
[extensions-img]: https://img.shields.io/nuget/v/Vezel.Cathode.Extensions?label=Vezel.Cathode.Extensions
5956

6057
[core-dls]: https://img.shields.io/nuget/dt/Vezel.Cathode?label=
61-
[hosting-dls]: https://img.shields.io/nuget/dt/Vezel.Cathode.Hosting?label=
6258
[extensions-dls]: https://img.shields.io/nuget/dt/Vezel.Cathode.Extensions?label=
6359

6460
To install a package, run `dotnet add package <name>`.

cathode.sln

Lines changed: 106 additions & 127 deletions
Large diffs are not rendered by default.

global.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"allowPrelease": false
77
},
88
"msbuild-sdks": {
9-
"Microsoft.Build.Traversal": "4.1.0"
9+
"Microsoft.Build.Traversal": "4.1.0",
10+
"Vezel.Zig.Sdk": "4.2.16"
1011
}
1112
}

0 commit comments

Comments
 (0)