Read the installation steps to get Daslang for your system, then read the tutorial.
We are going to need git, cmake, vscode and a C++ compiler for your platform.
git clone https://github.com/GaijinEntertainment/daScript
cd daScript
cmake -B build -G "Unix Makefiles"
cd build && make daScript -j$(nproc)
You may also want to create a symlink in the /bin
directory for easy access
to the compiler.
sudo ln -s /home/andrew/daScript/bin/daScript /bin/das
Currently, the best supported editor is VSCode.
To set up the language server follow these instructions: daScript-plugin
Hint: if the autocompletion doesn't seem to work, try increasing
dascript.server.connectTimeout
plugin parameter up to 10 (or 20 in case of
Debug build).
Now let's test what we've got:
- Start small, an obligatory Hello world
# File: hello_world.das
# Run: das hello_world.das
[export]
def main
print("Hello world\n")
In case you are wondering [export]
annotation here ensures that function can be called externally given context.