Skip to content

Development

The repository uses devenv to provide a reproducible development environment with all required tools (Smithy CLI, JDK, .NET SDKs, formatters). See devenv.nix and devenv.yaml at the repo root for the full definition.

The recommended way to activate the environment is via direnv. After installing direnv and running direnv allow once in the repo root, the environment activates automatically whenever you enter the directory.

To enter the shell manually instead:

devenv shell

All day-to-day tasks are defined as just recipes. Run just with no arguments to list them.

RecipeWhat it does
just restoreRestore NuGet packages
just codegenBuild the Java generators and stage the bundled Maven repository
just buildBuild in Release configuration (runs codegen and restore first)
just testRun the test suite
just cleanDelete all build output, including the Smithy plugin cache under obj/
just fmtFormat C#, Java, Nix, YAML, and the justfile
just check-formatVerify formatting (used in CI)
just packPack NuGet packages to artifacts/packages
just docsStart the documentation dev server
just ciCheck formatting, build, test, pack, rebuild examples, and run AOT and template smoke tests

Run just build before testing: conformance projects need the staged generator JARs. Examples consume packed packages, so use just pack and just refresh-examples after runtime or generator changes.

just pack

The generated .nupkg files are written to artifacts/packages.

Add a NuGet.config next to the consumer project to make the local feed available alongside nuget.org:

NuGet.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="smithy-net-local" value="../../artifacts/packages" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>

Adjust the relative path to match your project layout.

See Releasing.