#I might try to emulate the rust sdk bc
1 messages · Page 1 of 1 (latest)
Do you mean bootstrapping as in it spins up a container with the relevant sdk mounted inside it?
You know, I’m really not sure what additional work it has to do, I just know that the other sdks have a dependency on the go sdk- if you read the traces closely you’ll always see some go sdk in there even if you’re working in, say, typescript
@half delta will surely have some good pointers here since he was the last one to implement the Java SDK 🙏
In short, all SDKs except the Go one are made as Dagger modules.
The Go module is different because you need to have one first, and one available to write the module SDK.
If I'm right all SDKs are written as Go modules.
Basically a SDK module is a Dagger module implementing specific methods:
- codegen: https://github.com/dagger/dagger/blob/fd8f7cb12167e151c3b56f20bffc5d67d6b1bc14/core/sdk.go#L93-L113
- runtime: https://github.com/dagger/dagger/blob/fd8f7cb12167e151c3b56f20bffc5d67d6b1bc14/core/sdk.go#L145-L161
I pointed to the comments containing the graphql definition of those methods, as it's seen as module's functions and not Go code.
I wanted to write a full doc on how to write SDKs, but still haven't done it 😕
But happy to help answering any question on how to write a SDK 🙂