Repository directory structure
The Darklang repo contains multiple services and compilation targets
Directory listing
.circleci- CI config file.ionide- config for F# VSCode plugin.vscode- VSCode configconfig- a set of env vars for each environment. You'll be interested in thedevenvironmentdocs- sporadic documentationdocs/production- documentation about how we run the Darklang servicebackend- The backend written in F# and .NET. including the language definition and execution engine, the "framework" (HTTP, DB, queues, etc), the editor's HTTP API, and the execution engine which runs in the client..paket- Used by the Paket/NuGet package managerBuild- where the compiler puts compiled codepaket-files- Used by the Paket/NuGet package managersrc/BackendOnlyStdLib- implementation of functions which need to be run on the backend, due to their connection to the DB, queues, etc.src/BwdServer- webserver that is grand-user facing (at builtwithdark.com)src/ClientTypes- type definitions of types that are used in client-server communicationsrc/ClientTypes2BackendTypesandsrc/ClientTypes2ExecutionTypes- mappings between 'internal' types and our client-facing typessrc/CronChecker- trigger events for scheduled worksrc/ExecHost- allow executing admin tasks (such as migrations) in productionsrc/HttpMiddleware- where we define our middlewares used in Darklang HTTP handlerssrc/LibBackend- the framework functionality (HTTP, DB, queues, traces, secrets, serialization), including standard library functions which only run on the backend (and not in the client)src/LibBinarySerialization- types that we use to store Darklang programs to our Postgres databasesrc/LibExecution- the Darklang language, including types, the runtime, and of course the execution enginesrc/LibExecutionStdLib- most of the standard library functions (anything that doesn't need to be run on the backend)src/LibRealExecution- Small wrapper around LibExecution for running in productionsrc/LibService- library with some common functionality for F# services (currently just the backend, soon queues and cron)src/Prelude- utilities, libraries, common types; used everywheresrc/Parser- parser for Darklang languagesrc/QueueWorker- pulls user events from the queue and runs themtests/TestUtils- utilities used in Tests and FuzzTeststests/Tests- mostly unit tests for backend and libexecution functionalitytestfiles/data- text and binary files used during various backend teststestfiles/execution- unit test definitions for language and standard librarytestfiles/httphandler- tests for the Darklang HTTP server and middlewaretestfiles/httpclient- tests for the HTTP Library functions
rundir- anything that runs and stores something stores it herelogs- logs from running services, especiallybwdserver.log(backend)
scripts- bash scripts to do common (and sometimes uncommon and therefore forgettable) actions on the repo. Using scripts is very very common. Anytime there's something interesting, we add a script to do it. Scripts are occasionally out of date.