-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuild.bat
More file actions
52 lines (46 loc) · 1.21 KB
/
build.bat
File metadata and controls
52 lines (46 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
@echo off
echo Building Rust EtherNet/IP Library v0.5.3...
echo =============================================
echo.
echo [1/4] Building Rust library (release)...
cargo build --release --lib
if %errorlevel% neq 0 (
echo ❌ Rust build failed!
exit /b %errorlevel%
)
echo ✅ Rust library built successfully
echo.
echo [2/4] Copying DLL to C# project...
copy target\release\rust_ethernet_ip.dll csharp\RustEtherNetIp\
if %errorlevel% neq 0 (
echo ❌ Failed to copy DLL!
exit /b %errorlevel%
)
echo ✅ DLL copied successfully
echo.
echo [3/4] Building C# wrapper...
cd csharp\RustEtherNetIp
dotnet build --configuration Release
if %errorlevel% neq 0 (
echo ❌ C# build failed!
exit /b %errorlevel%
)
echo ✅ C# wrapper built successfully
echo.
echo [4/4] Running tests...
cd ..\RustEtherNetIp.Tests
dotnet test --configuration Release --verbosity minimal
if %errorlevel% neq 0 (
echo ❌ Tests failed!
exit /b %errorlevel%
)
echo ✅ All tests passed
cd ..\..
echo.
echo 🎉 Build completed successfully!
echo.
echo 📦 Outputs:
echo Rust DLL: target\release\rust_ethernet_ip.dll
echo C# DLL: csharp\RustEtherNetIp\bin\Release\net9.0\RustEtherNetIp.dll
echo.
echo 🚀 Ready for deployment!