Creating a Comma project
A note on SDKs
When you create or import your first project, you will be asked to select a Raku SDK, which is really just the Raku compiler that you wish to use. The specified Raku compiler will:
- Be used to run code and tests when you explicitly ask that
- Be queried for symbols in its
CORE.setting
so we can show auto-completions that are correct for the Raku version that you have installed - Be called with a
use
statement for modules that are outside of your Comma project (for example, those installed from the Raku module ecosystem and those likeTest
which are bundled with Raku). This is done to provide symbols from those modules for auto-complete purposes. Code inside of your project is parsed by Comma itself.
If you have a perl6
program in your path then this will be proposed automatically. If not, then
navigate to the directory where your perl6
(Linux, MacOS) or perl6.bat
(Windows) is located.
Creating a new project
The first time you open Comma, you’ll be presented with the option to create a new project. This can
also be found on File
menu (under New
, Project
). Comma currently provides a few basic project
templates:
- Raku Module - for creating a module. Stubs the module file, a test, and a META6.json
- Raku Application - like for Raku Module, but also creates a
bin
directory with an entrypoint script in it - Raku Script - a project with a single Raku script file in its root directory
- Cro Web Application - a project with a stub Cro web service or application
Importing existing Raku code
From the Comma welcome screen, select Import Project. Alternatively, go to the File
menu, then
New
, then Project from existing sources
. Select the directory where your module, application,
or scripts are found (provided you have one, this is the directory where the META6.json
is
located).