-
Notifications
You must be signed in to change notification settings - Fork 7
2. Setup
Now that you (hopefully) have some level of familiarity with Rust, time to get setup with the toolchain needed to make plugins for skyline.
First up install the following:
Next run the following command in a terminal of your choice:
cargo install cargo-skyline
This will install cargo-skyline
, an extension to cargo
(the Rust package manager). To check it is installed properly, try viewing the help text using:
cargo skyline --help
This should display a list of subcommands available to you.
First up, find a good place for all your future plugins to go. This will be your workplace. Probably start with an empty folder, as that will make navigation easier.
Example of an appropriate workspace directory:
C:\Users\jam1garner\skyline-workspace
Now, open a command line within that directory and run the following command:
cargo skyline new my_first_plugin
This will create your first plugin and also prompt you to do initial setup, like so:
Double check that the folder structure looks correct to you, then type "y" and hit enter. Then wait for the command to finishing setting up your workspace. Enjoy the small bit of peace. Let the tension out of your shoulders. Take some deep breaths.
Now that that's finished, change your current directory to be inside that of your plugin (cd my_first_plugin
) and then run the following command inside your plugin directory to build your plugin:
cargo skyline build
The resulting plugin should be at the following location: target/aarch64-skyline-switch/debug/libmy_first_plugin.nro
.
All you need to do is visit git-scm, select your operating system and follow the instructions for installing 'git'.
This error is caused because 'rust-lld' has not been added to your PATH. Fixing this is very simple but the process differs depending on your Operation System.
For Windows 10
- Open the Start menu and look for "Edit the system environment variables". (You can simply type that when the menu is open)
- At the bottom of the window is a button with the label "Environment Variables...", click on it.
- A new window with two different lists will show up. In the bottom one (System variables), look for 'Path' in the list. Select it and click on the "Edit" button.
- On the right in the "Edit environment variable" window is a "New" button. Press it.
- What you want is to add the location of your
.cargo\bin
folder, which is located in your user profile directory by default. For this, we'll assume you are working with the default settings.
AddC:\Users\XXXXXXX\.cargo\bin
to the list but make sure to replace XXXXXXX with your user name. - Confirm with "Ok", open a new command prompt and run the command again.
[TODO]
[TODO]