I’ve been able to install and run leaf and VSCode in Windows 10 without a cumbersome virtual machine. Instead i relied on WLS (Windows Linux Subsystem)
Disclaimer: This is not an official method and I don’t guaranty it will work for every scenario. However in my case, initial tests were conclusive.
In Windows 10:
Make sure WLS (Windows Linux Subsystem) is activated
– execute Turn Windows Feature on and off
– check Windows Subsystem for Linux box
– restart your PC
Install the following extensions:
– legato
– Remote - WSL
With the Remote - WSL extension installed, you will see a new Status bar item at the far bottom left in green
Click on it and select “Remote WSL – New Window” (as an alternative you can press Shift + CTRL + P to bring up the command list). It will open a new VS Code window running in the WLS environment.
make sure to activate the legato extension in this new window and you should be good to go
I followed your instructions and was able to build/install a basic system.
Update:
I’ve since successfully built a more complex system comprised of: 13 user apps, 17 user components, 15 user api interfaces.
The only issue here is the Legato VS Code plugin’s inability to resolve user-defined types in non-framework.api files in the editor. This flags problems such as identifier "name_of_type" is undefined with lots of squiggly red lines.
The build process, however, seems solid and will pick up on any legitimate errors and display them in the build task terminal.
Performance seems fine to me. It’s an improvement over a sluggish VM.
I encountered some minor issues with Leaf package installations but they were specific to my PC (running low on storage, attempt to install leaf packages, process fails at toolchain configuration, free some space, further attempts failed because the toolchain “folder already exists”, manually delete folder in WSL terminal, try again, no issues).
Has anyone tried this with WSL 2.0 yet? We are about to test it in the coming weeks. We’ve had experimental success with WSL 1.0 but it takes a while to build Legato and it’s very sluggish.
Once we test this out I’ll provide an updated post but just curious if anyone else has feedback on it.
Err:5 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 linux-libc-dev amd64 4.15.0-112.113
404 Not Found [IP: 91.189.88.142 80]
:
Err:8 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-dev amd64 3.6.9-1~18.04ubuntu1.1
404 Not Found [IP: 91.189.88.142 80]
:
Err:11 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 python3.6-dev amd64 3.6.9-1~18.04ubuntu1.1
404 Not Found [IP: 91.189.88.142 80]
Fetched 5315 kB in 1s (4552 kB/s)
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_4.15.0-112.113_amd64.deb 404 Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python3.6/libpython3.6-dev_3.6.9-1~18.04ubuntu1.1_amd64.deb 404 Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python3.6/python3.6-dev_3.6.9-1~18.04ubuntu1.1_amd64.deb 404 Not Found [IP: 91.189.88.142 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
But running apt-get update did fix that.
Despite successfully installing Leaf at step 6, Installing the Legato extension at this point didn’t work:
I think this is where you should install the Legato extension?