#Dagger Architecture

1 messages · Page 1 of 1 (latest)

fallen stirrup
#

Out of curiosity, how do you generate the code for multiple languages?

hot zephyr
#

We're basically creating an interface based on strict typing and GraphQL

So if you wrote function hello(greeting:string) -> Container in python that used some specific python libraries inside the function that dont exist in another language, we're not going to generate code for those libraries in another language.

Instead, we provide an interface for foo that you can call from go or typescript. as long as the inputs and outputs are correct then everything will work

Under the hood foo() will be executed in its native python runtime regardless of what language its being called from.

documentation for this part is still a bit of a WIP but there are a few additional details here: https://github.com/dagger/dagger/blob/main/sdk/CONTRIBUTING.md#codegen

GitHub

An engine to run your pipelines in containers. Contribute to dagger/dagger development by creating an account on GitHub.

#

This is also worth reading, its an older post, its possible some things are out of date but its a good overview of the magic behind how Dagger + GraphQL works

https://dagger.io/blog/graphql

TDLR;

Here’s the answer: we were cheating. Our SDKs don’t actually run your pipelines! Instead they send pipeline definitions to the Dagger Engine, which runs them and returns the result in a language-agnostic way.

Powerful, programmable CI/CD engine that runs your pipelines in
containers — pre-push on your local machine and/or post-push in CI