Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
github.com/lukasmalkmus/spl
A toolchain for a simple programming language, inspired by the Go toolchain. - by Lukas Malkmus
spl is a compiler and toolchain for a simple programming language I had to build a compiler in an university course on building compilers. The design is heavily inspired by the packages of the Go language and features a handwritten parser as well as the two excellent books from Thorsten Ball on building an interpreter and a compiler.
The languages specification can be reviewed here (in german). A machine translated one in english (yes, I'm a lazy fuck) can be reviewed here.
The easiest way to run spl is by grabbing the latest standalone binary from the release page.
This project uses native go mod support for vendoring and requires a working
go
toolchain installation when installing via go get
or from source.
go get
GO111MODULE=on go install github.com/lukasmalkmus/spl/cmd/spl
git clone https://github.com/lukasmalkmus/spl.git
cd spl
make # Build production binary
make install # Build and install binary into $GOPATH
The installation can be validated by running spl version
in the terminal.
spl is a Twelve Factor Application and can be configured by either
configuration file, the environment or command line flags. It provides a basic
help flag --help
which prints out application and configuration help. See
using the application.
Configuration files are TOML formatted:
[format]
indent = 8
Sections which are in TOML indicated by [...]
are mapped to their respective
environment variables by seperating sections and values with an underscore _
.
However, they are prefixed by the application name:
export SPL_FORMAT_INDENT=8
The same is true for command line flags but they are separated by a dot .
and
not prefixed:
spl --format.indent=8
Configuration values without a default value must be set explicitly.
The application itself can echo out its configuration by calling the config
command:
spl config > spl.toml
Configuration priority from lowest to highest is like presented above: Configuration file, environment, command line option (flag).
# SPL COMPILER TOOLCHAIN CONFIGURATION
# Source code formatter configuration.
[format]
# Indentation width used.
indent = 4
spl [flags] [commands]
Help on flags and commands:
spl --help
Feel free to submit PRs or to fill Issues. Every kind of help is appreciated.
More information about the project layout is documented here.
© Lukas Malkmus, 2019
Distributed under MIT License (The MIT License
).
See LICENSE for more information.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.