Make sure you have Rust toolchain installed
You won't be able to execute program or run tests as sdk supports only windows
- Add windows target
rustup target add x86_64-pc-windows-gnu
- Add MinGW (e.g. for the alpine
apk add mingw-w64-gcc
) - Specify target by env
CARGO_BUILD_TARGET=x86_64-pc-windows-gnu
You can now build some of the bin using cargo build --bin app
, but you have to run it on any other windows machine with the Dragon Center installed.
Should work without any hassle.
Run cargo run
to run app server
There is a catch - wsl 2 runs in linux environment, but it still can run windows executable, so we can use WSL 2 linux environment to build actual program and then run built .exe file
- Install additional libs to able to build windows app following linux instructions
- Open WSL2 Terminal as Administrator
- Go to
native-app
directory - Run
cargo run
If you are using Rust inside Docker container you not able to run .exe files from inside it, but you can use named pipe to pass commands to the host WSL 2 instance that able to run .exe
For this either use Remote Containers extension with the provided .devcontainer
setup or follow next instruction:
- Install additional libs to able to build windows app following linux instructions
- Mount existing named pipe and scripts to the docker container
type=bind,src=${localWorkspaceFolder}/.devcontainer,dst=${containerWorkspaceFolder}/.devcontainer
- Specify environment variables for container:
CONTAINER_PROJECT_HOME
- path to the project inside the containerHOST_PROJECT_HOME
- path to projects in WSLMYSTIC_LIGHT_SDK_PATH
- absolute path tonative-app/sdk
libraryCARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUNNER
- relative path to.devcontainer/send.fish
script
- Run the container
- You can use
wsl2-docker.env
in order to fill needed environment variable that will wrap execution for the program run - Start new WSL terminal with admin right and execute script
.devcontainer/execute.fish
that will listen for new commands and execute it - Run
cargo run
inside the container - Execution will end without any info, but you should see test running output in the WSL terminal