Skip to content

Commit 8f2a091

Browse files
authored
Merge pull request #663 from Yubico/yesdk-1318
Adding readme to Yubico.NativeShims
2 parents 10b5901 + 7a47dd5 commit 8f2a091

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

Yubico.NativeShims/Yubico.NativeShims.nuspec

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
This is an internal package that is subject to change.
1212
</description>
13-
13+
<readme>docs/readme.md</readme>
1414
<dependencies>
1515
<group targetFramework=".NETFramework4.7" />
1616
<group targetFramework="netstandard2.0" />
@@ -36,5 +36,6 @@
3636
<file src="msbuild/Yubico.NativeShims.targets" target="buildTransitive/net47/Yubico.NativeShims.targets" />
3737
<file src="msbuild/_._" target="lib/net47/_._" />
3838
<file src="msbuild/_._" target="lib/netstandard20/_._" />
39+
<file src="readme.md" target="docs/" />
3940
</files>
4041
</package>

Yubico.NativeShims/readme.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Yubico.NativeShims
2+
3+
Yubico.NativeShims is a cross-platform C library designed to bridge the gap in native interoperation (interop) within the .NET environment. It serves as a foundational tool to handle nuances in API signatures and build configurations across different operating systems, facilitating a more unified and streamlined P/Invoke integration for Yubico's development stack.
4+
5+
## Why Yubico.NativeShims?
6+
7+
1. **Unified P/Invoke Contracts**: Addresses the limitations of P/Invoke by providing a single, universal contract that adapts to platform-specific differences in native library APIs, avoiding the need for multiple, complex P/Invoke signatures.
8+
9+
2. **Optimized Native Dependencies**: Incorporates essential functionalities from native libraries directly, reducing the SDK's footprint by allowing static linking and selective inclusion of dependencies, ensuring a leaner, more efficient library.
10+
11+
## Building Yubico.NativeShims
12+
13+
### Prerequisites
14+
15+
- **VCPKG**: Utilizes VCPKG to manage native dependencies. Ensure `VCPKG_INSTALLATION_ROOT` environment variable is set to your VCPKG installation path.
16+
- **Platforms**: Supports Windows (x86, x64, arm64), macOS (x64, arm64), and Linux (Ubuntu x64, arm64) through GitHub Actions CI workflows for comprehensive build coverage.
17+
18+
### Windows Build
19+
20+
- Install Visual Studio with C++ workload and ARM64 build tools.
21+
- Use "x64 Native tools command prompt" to navigate and run `./build-windows.ps1`.
22+
23+
### macOS Build
24+
25+
- Requires XCode installation.
26+
- Navigate to Yubico.NativeShims folder and run `sh ./build-macos.sh`.
27+
28+
### Linux Build
29+
30+
- Should ideally be run in a container (targeting Ubuntu 20.04) to avoid making changes to your environment.
31+
- Run `sh ./build-linux-amd64` or `sh ./build-linux-arm64` depending on the target architecture.
32+
33+
Refer to the provided scripts and GitHub Actions CI workflows for detailed building instructions across different platforms and architectures.
34+
35+
---

0 commit comments

Comments
 (0)