Aws-cdk: Mixing of Languages

Created on 13 Jul 2018  路  2Comments  路  Source: aws/aws-cdk

Hi,
so this is more of a question than an issue:
Where are the "barriers" between the different language implementations?
So would it be possible to have Constructs written in different languages within one App?

Related but not the same: will the cdk commands also be availlable for use within other tools (eg as a library) and if so, would also all languages be supported?
This would help to integrate cdk within language specific build tooling (eg pybuilder, sbt, ...)
cc @joh-m @pgarbe

Most helpful comment

At the moment, the rules are:

  • TypeScript constructs can be used from any language.
  • Non-TypeScript constructs can be used from within the same language, but not anywhere else.

So if you write a construct in Java, it can be used from Java, but not from any other language.

This is not a conceptual limitation, and we're looking at options to enable other interoperability models, but those are not coming any time soon. So in practice, these are the rules you'll have to work with at the moment.


Re: cdk as a library: this will totally happen at some point. In the very short future, see if you can integrate the command-line tool with your build process of choice, and let us know where the gaps are if you find any.

All 2 comments

At the moment, the rules are:

  • TypeScript constructs can be used from any language.
  • Non-TypeScript constructs can be used from within the same language, but not anywhere else.

So if you write a construct in Java, it can be used from Java, but not from any other language.

This is not a conceptual limitation, and we're looking at options to enable other interoperability models, but those are not coming any time soon. So in practice, these are the rules you'll have to work with at the moment.


Re: cdk as a library: this will totally happen at some point. In the very short future, see if you can integrate the command-line tool with your build process of choice, and let us know where the gaps are if you find any.

Cool, thanks for that quick answer. That already helps us a lot.
Expect a few more questions in the following weeks :)
Maybe thats also something for the docs

Was this page helpful?
0 / 5 - 0 ratings