GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - spawnlang/spawn: The Spawn programming language

BranchesTags
Open more actions menu

Latest commit

 

History

794 Commits
794 Commits

Folders and files

NameName
Last commit message
Last commit date
.etc
.etc
 
 
.github/workflows
.github/workflows
 
 
benchmarks
benchmarks
 
 
cmd
cmd
 
 
examples
examples
 
 
src
src
 
 
tests
tests
 
 
thirdparty
thirdparty
 
 
y
y
 
 
yh
yh
 
 
.dockerignore
.dockerignore
 
 
.editorconfig
.editorconfig
 
 
.git-blame-ignore-revs
.git-blame-ignore-revs
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
CMakeLists.txt
CMakeLists.txt
 
 
DIAGNOSTICS.md
DIAGNOSTICS.md
 
 
Dockerfile
Dockerfile
 
 
Dockerfile.v
Dockerfile.v
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
OPTIMIZATIONS.md
OPTIMIZATIONS.md
 
 
README.md
README.md
 
 
ROADMAP.md
ROADMAP.md
 
 
TESTS.md
TESTS.md
 
 
TODO.md
TODO.md
 
 
v.mod
v.mod
 
 

Repository files navigation

Spawn logo

Spawn Compiler & Toolchain

Installing Spawn from source

git clone https://github.com/spawnlang/spawn
cd spawn
make build     # or make release for fastest build
make build-fmt # optional, to install formatter

Add SPAWN_ROOT environment variable to your shell profile:

echo "export SPAWN_ROOT=$(pwd)" >> ~/.bashrc
source ~/.bashrc

To use spawnc executable anywhere, run:

sudo ./spawnc --symlink

On Unix systems, it creates a /usr/local/bin/spawnc symlink to compiler executable.

Build other tools:

make build-fmt

To build spawnprof see spawnprof repository

Editor/IDE support

JetBrains IDEs (Clion, IntelliJ IDEA, etc.)

Currently, the best support is provided in the IntelliJ IDEA family of IDEs with the Spawn plugin. It provides syntax highlighting, code completion, error highlighting, and more.

To install the plugin, go to Plugin Repository and follow instruction about manual installation.

VS Code

VS Code extension provides only syntax highlighting at the moment.

To install an extension, go to Extension Releases on GitHub. Download .vsix file, open VS Code, press Ctrl+Shift+P, type Install from VSIX, and select downloaded file. After restarting VS Code, you should see syntax highlighting for Spawn files.

You can try to install an experimental LSP server for Spawn. It is quite unstable and not recommended for use. To install it, run the following commands:

git clone https://github.com/spawnlang/spawn-analyzer
cd spawn-analyzer
spawnc . -o spawn-analyzer

Then in VS Code set the following settings:

{
    "spawn.serverPath": "/path/to/spawn-analyzer",
    "spawn.connectionMode": "tcp",
    "spawn.tcpMode.port": 5010
}

And reload VS Code.

Vim

Vim plugin provides only syntax highlighting at the moment.

To install a plugin, go to Plugin Repository and follow instruction about installation.

Editors with tree-sitter support (Zed, Neovim, etc.)

Spawn has a tree-sitter grammar that can be used in editors that support tree-sitter. To use it, go to tree-sitter-spawn repository to download the grammar. Then follow the instructions in your editor's documentation to install the grammar.

Tests

v install srackham.pcre2

// linux
apt install libpcre2-dev

// macos
brew install pcre2
make build-tester
./bin/tester

See TESTS.md for more details.

Usage

spawnc file.sp             # only compile
spawnc --run file.sp       # compile and run
spawnc -g file.sp          # compile with debug info
spawnc --opt file.sp       # compile with optimization and safety features
spawnc --opt-fast file.sp  # compile with optimization and no safety features

spawnc --test file_test.sp # compile and run test
spawnc --test ./           # compile and run test from directory

spawnc --profile cpu.prof file.sp     # profile cpu
spawnc --mem-profile mem.prof file.sp # profile memory

spawnprof cpu.prof                # show cpu profile as list
spawnprof cpu.prof --web          # open cpu profile graph in browser
spawnprof cpu.prof --graph g.svg  # save cpu profile graph as svg

./cmd/sfmt -w file.sp           # format file

Docker

This repository contains two Dockerfiles:

  • Dockerfile.v is used to create an image with optimized V compiler. This Dockerfile has nothing to do with Spawn, but it was placed here for organizational purposes. You don't need to use it at all (except for development). You can build V image with a command sudo docker build -t spawnlang/spawn -f Dockerfile.v ..
  • Dockerfile is used to create and image of optimized Spawn compiler + optimized tools (fmt, prof, pkg). This image also contains a GCC compiler. This image depends on the previously mentioned V image. You can build Spawn image with a command sudo docker build -t spawnlang/spawn -f Dockerfile ..

You can also access these and other Docker images on Spawn's DockerHub.

License

Spawn is licensed under the MIT license. See LICENSE for the full license text.

About

The Spawn programming language

spawnlang.dev

Resources

Readme
MIT license
Activity
Custom properties

Stars

7 stars

Watchers

2 watching

Forks

0 forks
Report repository

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.