We welcome contributions of any kind.
This section includes information for contributors.
Since this repo produces artifacts for multiple programming languages using jsii, it relies on the following toolchains:
Our CI/CD uses the "superchain" image from aws-delivlib.
This image can also be used locally like this (note that initial build may take quite some time):
$ git clone git@github.com:awslabs/aws-delivlib.git
$ cd aws-delivlib/superchain
$ docker build -t superchain .
$ IMAGE=superchain
This will get you into an interactive docker shell:
$ cd jsii # go to the root of the jsii repo
$ docker run --net=host -it -v $PWD:$PWD -w $PWD ${IMAGE}
You can then run ./build.sh
as described below.
The project is managed as a monorepo using lerna.
- Check out this repository.
- Run
./build.sh
to install lerna, bootstrap the repo and perform an initial build + test cycle.
All modules within this repository have the following scripts:
build
- builds the module (usually runs the TypeScript compiler).watch
- runstsc -w
which picks up changes and builds them progressively.test
- usesnodeunit test/test.*.js
to run all unit tests.package
- emits publishable artifacts todist/<lang>
Each one of these scripts can be executed either from the root of the repo using
npx lerna run <script> --scope <package>
or from individual modules using
npm run <script>
.
To bump the version of this repository, use the ./bump.sh
script.
This repository emits artifacts in multiple languages. The
pack.sh
and bundle.sh
scripts are used to
prepare the repository for publishing.
Each module that needs to be published implements an npm script called package
which emits publishable artifacts to dist/<lang>
(e.g. dist/dotnet
for
NuGet, dist/js
for npm, dist/java
for Maven Central). All those "dist"
directories are merged into a single .zip file that is later on used in our
CI/CD publishing tasks. Each lang
directory is published to the respective
repository.
jsii language bindings consist of two main components:
- A runtime client library: a library implemented for each language. This
library is responsible to manage the child
jsii-runtime
process and interact with the jsii-kernel. - jsii-pacmak generator: extend the jsii-pacmak project to be able to generate proxy classes for a jsii module.
This section can definitely use some additional information.
The runtime client library should be implemented as a module under
packages/jsii-<lang>-runtime
.
The jsii runtime client library usually includes the following components:
- Child process manager: responsible to start/stop the jsii-runtime child process.
- Protocol layer: implements the STDIN/STDOUT protocol that interacts with the jsii-runtime.
- Proxy layer: includes base classes and serialization utilities to implement the generated proxy classes.
More documentation should be added here. In the meantime, refer to the Java implementation as a reference:
The pacmak code generator should be implemented under
jsii-pacmak/lib/targets
.
The java target is a good example to work from.