Note, the Hylo compiler is in an early phase of development, so expect things to break. If you noitce issues, please submit either for the Hylo compiler or for the VSCode extension. if it's a known issue by searching for it.
If you want to get involved with developing Hylo, please reach out via Slack.
- Install the Hylo Compiler
- You will need to build the compiler from sources. For this, the recommended approach is to use development containers and VSCode.
- Check the instructions at https://github.com/hylo-lang/hylo
- Install the Extension
- Install this extension. If you are working inside the Hylo devcontainer, it should be installed automatically.
-
Set Up Compilation Using Command Template (Recommended): - Open VSCode Settings (
Ctrl+,
orFile > Preferences > Settings
) - Search for "Hylo" - Enablehylo.useCommandTemplate
- Configurehylo.commandTemplate
to match your setup. For example:- Default:
hc ${ARGS}
(assumes the compiler is in your PATH) - Example with Swift:
swift run hc ${ARGS}
- Default:
-
Alternative: Configure the Compiler Path: - If you have built the compiler and prefer direct usage:
- Open VSCode Settings (
Ctrl+,
orFile > Preferences > Settings
) - Search for "Hylo"
- Set
hylo.compilerPath
to the path of your Hylo compiler - Example with absolute path:
C:\hylo\bin\hc
or/usr/local/bin/hc
- Open VSCode Settings (
Create a .vscode/launch.json
or add it using the Debug: Add configuration
action.
{
"version": "0.2.0",
"configurations": [
{
"type": "hylo",
"request": "launch",
"name": "Run Hylo Module",
"program": "${workspaceFolder}/MyHyloModule",
"isFolder": true
},
{
"type": "hylo",
"request": "launch",
"name": "Run Hylo File",
"program": "${workspaceFolder}/main.hylo"
}
]
}
Perfect for learning Hylo or creating small examples:
- Create a new file with
.hylo
extension - Write your Hylo code
- Run it directly with:
- The play button in the editor title area
- Right-click → "Hylo: Run Current File"
Ctrl+Shift+P
→ "Hylo: Run Current File"
Example workflow for a "Hello World" program:
- Create
hello.hylo
:fun main() { print("Hello, Hylo!") }
- Click the play button in the editor title
- See output in the "Hylo" output panel
For more complex projects with multiple Hylo files:
- Organize your files into folders
- Right-click on a folder → "Hylo: Compile and Run Folder"
- Or set up a launch configuration for better ergonomics (run via F5):
{ "type": "hylo", "request": "launch", "name": "Run Project", "program": "${workspaceFolder}/src", "isFolder": true }
{
"type": "hylo",
"request": "launch",
"name": "Debug with Development Compiler",
"program": "${file}",
"compilerPath": "${workspaceFolder}/dev-tools/hc"
}
The language and this extension are in very early in their development. If you encounter any issues:
- Check the GitHub repository for updates
- File issues for bugs or feature requests
- Consult the Hylo language documentation for language-specific questions