<- Appendix B

Appendix C - Public Surface Reference

This appendix lists the public package surfaces that should remain stable across ordinary implementation changes.

Package Paths

@jhlagado/azm
@jhlagado/azm/compile
@jhlagado/azm/tooling
@jhlagado/azm/cli

Root Exports

@jhlagado/azm re-exports the stable compile, tooling, diagnostic, register-care and output types. It is the broad package entry for consumers that want one import path.

Compile Exports

@jhlagado/azm/compile exposes:

  • compile
  • defaultFormatWriters
  • writeHex
  • compile option and result types
  • artifact types
  • D8 map types
  • output writer types

Use this path for build tools, Debug80 integration and scripts that need bytes or artifacts.

Tooling Exports

@jhlagado/azm/tooling exposes:

  • loadProgram
  • loadProgramNext
  • analyzeProgram
  • analyzeProgramNext
  • analyzeRegisterCareForTools
  • diagnostic types
  • case-style mode types
  • register-care tooling result types

Use this path for editors, linters and language tooling.

CLI Export

@jhlagado/azm/cli exposes the compiled CLI module and backs the azm binary. The user-facing command is the package binary:

azm [options] <entry.asm|entry.z80>

Public Data Shapes

Treat these as public contracts:

  • Diagnostic
  • CompileNextFunctionOptions
  • CompileNextResult
  • Artifact
  • D8mJson
  • D8mArtifact
  • D8mSegment
  • D8mSymbol
  • LoadedProgramNext
  • AnalyzeProgramNextResult
  • RegisterCareCandidateDiagnostic
  • RegisterCareCodeAction

When these shapes change, update package tests, TypeScript type tests, README examples, repo-local reference docs and this manual.