# Introduction `jsii` allows code in any language to naturally interact with **JavaScript** classes. It is the technology that enables the [AWS Cloud Development Kit][cdk] to deliver polyglot libraries from a single codebase! [cdk]: https://github.com/aws/aws-cdk A class library written in **TypeScript** can be used in projects authored in **TypeScript** or **Javascript** (as usual), but also in **C#** (and other languages from the _.NET_ family), **Go**, **Java**, **Python**, ... More languages will be added in the future! !!! warning Due to *JSON* marshaling costs and the absence of a distributed garbage collector feature, `jsii` modules are best suited for development and build tools, as opposed to performance-sensitive or resource-constrained applications. See [Runtime Architecture] for more information. [runtime architecture]: overview/runtime-architecture.md ## An example is worth a thousand words Consider the following **TypeScript** class: ```ts /** * A simple greeter, hello world style. */ export class Greeter { /** * Greets the designated person. * * @param name the person to greet. * * @returns a greeting. */ public greet(name: string) { return `Hello, ${name}!`; } } ``` By compiling our source module using `jsii`, we can now package it as modules in one of the supported target languages. Each target module has the exact same API as the source. This allows users of that target language to use `Greeter` like any other native type: === "C#" ```csharp var greeter = new Greeter(); greeter.Greet("World"); // => Hello, World! ``` === "Go" ```go greeter := NewGreeter() greeter.Greet("World") // => Hello, World! ``` === "Java" ```java final Greeter greeter = new Greeter(); greeter.greet("World"); // => Hello, World! ``` === "JavaScript" ```java const greeter = new Greeter(); greeter.greet("World"); // => Hello, World! ``` === "Python" ```python greeter = Greeter() greeter.greet("World") # => Hello, World! ``` ## How to use this website The documentation in this website is separated in different topics, which can be navigated using links in the site's header bar: - The [Welcome](./index.md) section provides a high level overview of *jsii*. - The [User Guides](./user-guides) section includes the following: - The [Library Author Guide](user-guides/lib-author) is intended for developers who are looking to author libraries using *jsii* to enable polyglot support for their work. - The [Library Consumer Guide](user-guides/lib-user) is intended for developers who are consuming libraries generated by *jsii* in the various supported target languages. - The [Language Implementation](user-guides/language-support) is intended for developers who are looking to add support for a new *target language* in *jsii*. - The [Specification](specification/1-introduction) provides detailed information on the internal components of *jsii*. - The [Architecture Decision Records](decisions/introduction) contains the log of all architectural decisions made while developing the *jsii* project. ## How to contribute The [*jsii project*](https://github.com/aws/jsii) welcomes all kind of contributions. You can refer to the [Contribution Guide](https://github.com/aws/jsii/blob/main/CONTRIBUTING.md) on GitHub to get more information about how to contribute to the project in general. !!! tip You can submit pull requests for documentation updates without leaving the comfort of your web browser! All pages of this website have a :material-pencil: icon on the top right of each page that links to a GitHub web editor for the source of the page in question.