Skip to content
bsamieePublic

About

Rasm is a polyglot monorepo with macOS-first development and portable code and tooling for Linux and Windows.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5,816 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[RASM]

Rasm is a polyglot monorepo with macOS-first development and portable code and tooling for Linux and Windows.

[01]-[LAYOUT]

Folders name categories down to a project, the first folder holding a manifest, and folders inside a project group its own concepts:

Rasm/
├── products/
│   ├── apps/                 # Projects based on other vendors' applications
│   ├── developer/
│   ├── ai/
│   ├── macos/
│   ├── cli/
│   └── web/
├── libs/                     # Packages by language, then category
│   ├── cpp/
│   ├── dotnet/
│   ├── python/
│   ├── rust/
│   ├── swift/
│   └── typescript/
├── tests/                    # Suites by the category of what they test
│   ├── products/
│   ├── libs/
│   ├── tools/
│   ├── e2e/                  # Suites against a served or installed product
│   └── support/              # Test harnesses by language
├── tools/                    # Checks other checkers lack
│   ├── ast-grep/             # Rules and outline catalogs per language
│   ├── conformance/          # Nx project graph and workspace files
│   ├── dylint/               # Rust
│   └── refurb/               # Python
├── assets/                   # Repo submodule durable assets no product owns
├── infra/                    # Pulumi programs for the repository, machines, and hosting
├── plugins/                  # Agent harness plugins, shared or per host
├── docs/                     # Repo guides and standards by topic and language
├── Package.swift             # Swift workspace and central package catalog
├── nx.json                   # Nx plugins, release, and conformance
├── package.json              # TypeScript
├── pnpm-workspace.yaml       # TypeScript workspace and central package catalog
├── tsconfig.*                # TypeScript
├── vitest.config.ts          # TypeScript
├── .oxlintrc.json            # TypeScript and JavaScript
├── .oxfmtrc.json             # TypeScript, JavaScript, and data files
├── eslint.config.ts          # Nx plugin collections
├── pyproject.toml            # Python workspace and central package catalog
├── Workspace.slnx            # .NET workspace
├── global.json               # .NET
├── Directory.Packages.props  # .NET central package catalog
├── Directory.Build.props     # .NET
├── Directory.Build.targets   # .NET
├── NuGet.config              # .NET
├── CMakeLists.txt            # C++ workspace
├── CMakePresets.json         # C++
├── vcpkg.json                # C++ central package catalog
├── .clang-format             # C-family style
├── .clang-tidy               # C-family checks
├── .clangd                   # C++ compile database scope
├── sgconfig.yml              # ast-grep
├── .editorconfig
├── Cargo.toml                # Rust workspace and central package catalog
├── rust-toolchain.toml       # Rust
├── .cargo/                   # Rust
├── .github/
├── .config/                  # Tool configuration and Xcode workspace of every app and root package
├── .claude-plugin/           # Marketplace for Claude Code and Codex
├── .vscode/
├── CLAUDE.md                 # Agent standards, linked as AGENTS.md
├── LICENSE
└── README.md

[02]-[PRINCIPLES]

  • Each fact sits once in the file its tool reads, and every other use derives it
  • Tool behavior comes from its source and docs at the installed version, and configuration sets only what departs from it
  • Tools read configuration from .config/ where a setting names its path, else from their fixed path, and checkers report every finding as an error
  • Each ecosystem pins every version, root tooling included, in its root catalog and lock, and targets build from the committed lock
  • Changes start from reading the file and log line their claim cites, as docs and reviews state facts those files contradict
  • Doppler project rasm and 1Password op hold every secret
  • SQL schemas reconcile the live database to owning types with no migration files, and drop or retype only what an owning type retires

[03]-[MISE]

mise installs every tool, [env] holds process variables, and [bootstrap] holds what a machine's OS keeps across boots:

  • Shells, Claude Code sessions through a SessionStart hook, and CI jobs through jdx/mise-action activate mise
  • mise bootstrap configures a machine for the workspace after a clone or a pull changing a [bootstrap] table
  • mise install installs every tool and project dependency and sets the rustup default to the pinned toolchain
  • mise install runs cargo clean in a checkout with a build folder another compiler wrote, read from the .rustc_info.json Cargo keeps there
  • .config/mise.toml [tools] rows stay at latest where a backend lists releases, and a version_regex excludes development builds and release candidates missing a locked platform
  • Platform rows sit in the .config/mise.<os>.toml mise loads, as only a file limits a row to one OS
  • Targets check--mise and fix--mise run mise lock --check and mise lock per locked environment, as a row a lock lacks fails locked installs
  • Lockfiles stay unwritten once one tool fails on a lockfile_platforms platform, so each row takes a source publishing every locked platform per release
  • [env] rows calling exec() take no tools = true, which multiplies their cost in every mise process, and run commands of the inherited PATH

[04]-[WORKSPACES]

Projects inherit versions and settings from their ecosystem root:

[INDEX] [ECOSYSTEM] [VERSIONS] [SETTINGS]
[01] TypeScript pnpm-workspace.yaml catalog, manifests name catalog: tsconfig.base.json, project types, lib, and jsx
[02] Python requires-python, root group catalog, member lower bounds Root [tool.*], [tool.uv] and [tool.ty] per uv root
[03] .NET dotnet row of mise, root Directory.*.props Root and folder Directory.Build.props, folder sets kind
[04] Rust rust-toolchain.toml, [workspace.dependencies] Cargo.toml [workspace.*], .cargo/config.toml
[05] Swift xcode-select, root Package.swift dependencies Package.swift swiftSettings
[06] C++ LLVM and Rhino SDK rows of mise, builtin-baseline Root CMakeLists.txt, CMakePresets.json families

Roots split, nest, or hold more where a host or tool decides:

  • LLVM comes from its release archives on Linux and Windows and from conda-forge on macOS, as LLVM publishes no macOS archive for some releases
  • Each uv root resolves one Python range, host Pythons take a root pinned to what each host bundles, and shared members require the lowest version
  • [tool.uv] applies from the root being locked alone, and nested uv roots take a [deps.<root>] mise row
  • Pixi supplies native libraries for sdists, and pixi run --locked python runs Python with them on the library search path
  • Host SDKs come from packages, every OS builds, checks, and packs host projects with no host installed, Unreal Engine and native code aside
  • Projects compiling Metal sources build on macOS alone, and projects removing SupportedPlatform Windows take tag os:darwin
  • pack places each NativeAsset under runtimes/<rid>/native/ and refuses one with a runtime identifier other than its host's
  • Host projects target their host's runtime and carry every dependency except SDK assemblies the host supplies
  • Imports of a package's build files take the property naming their users, as MSBuild reads imports before ProjectReference items
  • Folder Directory.Build.props files name a host, and Update rows of Directory.Packages.props hold packages to the runtime line of a project's target framework
  • .NET runs but Rhino suites build Release unless they name debug, which reaches references and Yak packages, and assemblies embed their PDB
  • Projects reach ImageSharp through Rasm.Imaging, as ImageSharp fails unsigned Release builds and .config/licenses/sixlabors.lic signs it alone
  • Swift modules, app code included, are root Package.swift targets, and Xcode app targets hold bundle, icon, and signing over their app module
  • Xcode app projects build through .config/Rasm.xcworkspace, as projects built apart each clone every package and compile it again
  • Root Package.swift builds and tests in that workspace through shared scheme Rasm-Package in place of SwiftPM, and Nx syncs its target lists
  • Scheme Rasm-Package tests through default plan .config/Rasm-Package.xctestplan, and -c performance runs .config/Performance.xctestplan
  • Xcode test targets run their default plan under xcodebuild's address and undefined-behavior sanitizers with -c asan, its thread sanitizer with -c tsan
  • Nx project Rasm-Package at .config/Rasm.xcworkspace holds the root package's Swift and Xcode targets, and root project rasm holds none
  • Workspace Package.resolved links to the root one, which swift package update moves and xcodebuild reads and writes through the link
  • User default IDEPackageOnlyUseVersionsFromResolvedFile of mise [bootstrap] holds Xcode windows to resolved versions, as builds are
  • .config/xcode.xcconfig turns on the Xcode compilation cache and holds settings every target takes, and cache hits need an unchanged build folder
  • Mise variable XCODE_XCCONFIG_FILE applies it to every target xcodebuild builds, as a package scheme otherwise compiles every module again
  • User default CompilationCachingDiskSizeLimit of mise [bootstrap] caps that cache, as Xcode otherwise lets it reach half the free disk
  • App projects base each configuration on .config/app.xcconfig, which sets app signing and packaging and includes both other xcconfig files
  • C++ packages declare their own project(), and preset families llvm, xcode, and unreal build them through .config/cmake/toolchains/
  • llvm links mise LLVM's libc++ privately outside Windows, xcode takes Apple clang and system libc++, and unreal its engine's compiler
  • Mise row http:rhino-sdk-cpp installs the Rhino C++ SDK on macOS at RHINO_SDK_CPP_ROOT, and xcode alone finds it and builds rasm-rhino
  • Rasm.Rhino packs librasm-rhino.dylib for osx-arm64, and .config/ClangSharp.targets binds rasm-rhino headers into NativeMethods.g.cs
  • Unreal plug-ins sit beside the project enabling them, and name each C++ package they build with their engine's compiler in .uplugin nx.packages

[05]-[COMMANDS]

hk checks files and Nx runs project tools, so a checker reading named files alone is an hk step and one reading a project is an Nx target.

hk runs each .config/hk.pkl step whose glob matches a selected file:

  • hk check -> checks uncommitted files
  • hk fix -> applies fixes to uncommitted files
  • hk check <paths>, hk fix <paths> -> checks or fixes named files
  • hk check --all -> checks every tracked file
  • Commits run hook commit-msg alone, which checks each message's type and its scope against nx show projects

Nx runs targets its nx.json plugins infer, and a task whose inputs match an earlier run replays from the local or remote cache:

  • nx affected -t <target> -> runs each task of a target whose inputs a change since origin/main reaches, uncommitted files included
  • nx <target> <project> -> runs one target in one project, and nx <target> inside a project's folder runs it there
  • nx run-many -t <target> -> runs one target in every project
  • nx <target>--<tool> <project> -> runs one tool of a target
  • -c <configuration> -> runs a target's named variant (release, debug, headless, cache, asan, tsan)
  • Edits to nx.json, .gitignore, .nxignore, or tsconfig.base.json outside paths rerun every task, as Nx hashes them into each one
  • Tools keep their own incremental state, and Nx caches whole task results around it

Each target names one operation in every ecosystem:

  • check reports and fix applies findings of checkers reading a whole project
  • build compiles or packages a project into its declared outputs
  • test runs a project's test runners
  • typegen writes declarations and compile databases that type checks and editors read and no build loads
  • codegen writes source a project's tools derive from its schemas and configuration
  • serve runs development servers until the run ends, and preview builds a project, then serves its build output
  • install puts a development build where its host loads it, replacing the last and skipping packaging where allowed, or starts local services
  • pack writes release files that differ from build output, in its host or ecosystem's form, a folder product in a .zip or .dmg
  • deploy applies a project's Pulumi stacks after its dependencies', -c release a released version's, deploy--pulumi --stack=<name> one stack
  • dry-run previews what deploy applies over build output on disk and runs no other task, dry-run--pulumi --stack=<name> one stack
  • upgrade moves dependency requirements and locks to newer releases, through the ecosystem's own tool where one moves them
  • clean removes declared outputs, and configuration cache empties the caches its tools keep

Workspace commands run from the root:

  • nx sync -> writes executor schemas and tsconfig references, as runs outside CI stop on stale ones, never --skip-sync
  • nx conformance:check -> runs the nx.json conformance rules over every target
  • nx upgrade -> moves every project to newer releases, then every mise row and the lock of each environment
  • nx clean, nx clean -c cache -> removes every output, then every cache and workspace data through nx reset
  • nx migrate <version>, nx migrate --run-migrations, then pnpm dedupe -> applies a new Nx release
  • Use docs/Nx.md for plugin and nx.json rules

[06]-[TESTING]

Suites sit in tests/ except where their tool fixes the place:

  • Suites stay inside a nested tool root that stops discovery at its root (SwiftPM analyzer) or a plugin folder published whole
  • Projects needing no host run on every platform, and tags os:<platform> and host:<host> mark projects a toolchain, framework, or host limits, C++ aside
  • C++ projects take an Nx configuration per available workflow preset holding them (nx test <project> -c asan) and no os: tag
  • Preset conditions decide each OS's available workflows, and xcode configures on macOS alone
  • C++ targets default to their first workflow holding the project's tests, else their first

Rhino suites boot Rhino once per test process, one run per machine, as concurrent processes opening views on one Cloud Zoo license each raise a prompt:

  • Local runs on a machine with Rhino open views, or none under nx test <project> -c headless, in a scratch profile seeded with license files
  • CI tests Rhino suites headless on Windows runners through Rhino.Inside, over the newest release of their pinned major

[07]-[DELIVERY]

Products deliver through the same targets in every ecosystem, development builds to a local host and releases to GitHub and each product's channel:

  • Targets write every deliverable from the built product, store screenshots and promo tiles included, with no hand-made file
  • doppler run --config release --command 'nx pack <app>' packs a Mac app with release signing, notarized as a .dmg holding the stapled ticket where ASC_API_* rows are set
  • Mac apps whose Info.plist states SUFeedURL take a Sparkle feed of their .dmg from nx release publish, and other Mac apps release through attach alone
  • Commit scopes name one project as nx show projects prints it, or none, as nx release refuses a scope matching more than one release project
  • nx release --skip-publish versions each release project alone from commits since its <project>@<version> tag, tags it, and patches dependents
  • Unscoped breaking commits touching a file every project hashes (nx.json, pnpm-lock.yaml) bump every release project
  • Conventional commits since a project's last tag write its GitHub release notes without authors, and no changelog file exists
  • New release projects take an annotated <project>@<version> tag by hand at their manifest version, in place of --first-release
  • nx release <version> --projects=<projects> --skip-publish moves projects to an exact version alone, as a prerelease line takes its stable release
  • nx run-many -t attach -c release uploads released files to each tag's GitHub release, and stores with no upload API take files by hand
  • attach creates a tag's GitHub release where none exists, as nx release makes none for hand-made tags or dependents outside --projects
  • nx release publish sends the same files to each registry or store its ecosystem's publish setting allows, skipping until a credential is set
  • Release publishes to npm, PyPI, NuGet, and crates.io by trusted publishing alone, elsewhere by a rasm/release row named as the variable a target reads
  • Rows NUGET_API_KEY and CARGO_REGISTRY_TOKEN serve first publishes by hand alone, as crates.io takes a trusted publisher on a published crate
  • Store items take their first upload by hand at the store dashboard, as store APIs publish only to listed items

[08]-[MACHINES]

infra/ Pulumi programs declare what runs on each machine and how it is reached:

  • Stacks declare every image a machine runs, Unreal job images included, and build those no registry publishes, and .github/ builds none
  • App hosting.config.ts targets name Cloudflare or a machine with role Apps, and nx install @rasm/infra runs role Apps under rasm.localhost
  • Container engines run under systemd on machines and, on the owner's Mac, in a Colima VM DOCKER_HOST names
  • Project docker exists on every machine, and its install--docker starts the Colima VM a workspace COLIMA_HOME names or confirms systemd's engine answers
  • Packages requiring an engine client take tag host:docker, and their test--* and install--* tasks depend on docker:install--docker
  • Colima keeps its VM in .cache/colima under profile COLIMA_PROFILE, as Docker contexts take a profile name and a default profile elsewhere owns context colima
  • install--docker moves a VM it starts to the newest container runtime with colima update, as the Colima image pins an older Docker Engine
  • install--docker mounts Colima's data disk with online discard, clean--docker prunes images and build cache, and nx clean -c cache deletes the VM
  • Use docs/Infrastructure.md for each machine's roles, OS state, and reinstall

About

Rasm is a polyglot monorepo with macOS-first development and portable code and tooling for Linux and Windows.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages