Skip to content

Latest commit

 

History

1,192 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Silk Effect

Silk Effect is an unreleased low-level systems language built around explicit memory and execution control, typed failures, replaceable service requirements, deterministic cleanup, and tooling-friendly semantics. The repository is a strict TypeScript, ESM-only monorepo containing the stage-0 compiler, runtime-facing libraries, editor tooling, and language-pressure programs.

Silk currently runs one source program through a lossless frontend, module and type analysis, HIR, ownership and cleanup planning, specialization, MIR, and three differential execution paths:

  • the logical MIR evaluator;
  • native code and WebAssembly emitted through LLVM; and
  • a direct WebAssembly backend that does not require an external LLVM toolchain.

The implemented bootstrap language includes modules and visibility, scalar families, typed scalar constants, structs, fixed arrays, runtime slices, structural unions and exhaustive matching, generics, first-class callables and pipelines, mutation, structured loops, recursion, affine ownership, shared and exclusive borrowing, deterministic Drop, explicit allocation, static text and byte data, and typed Effect computations with explicit service requirements. Canonical Result, Effect, and Vector operations are ordinary navigable Silk source rather than compiler-recognized library names. Portable semantic logging is likewise source-defined: Effect.log and its level-specific aliases submit one complete borrowed string and a closed LogLevel through an explicit replaceable Logger, with stdout and deterministic in-memory providers supplied by the standard library. Portable whole-file interaction is source-defined as well: normalized provider-absolute Path values and a seven-operation mutable FileSystem service can be implemented by application-owned native, browser, Wasm, or test providers without introducing ambient storage or host imports.

Language documentation

This is still an alpha language. APIs may break freely. Cooperative single-threaded Fibers are implemented; parallelism, multithreading, networking, a package registry, broad FFI, and self-hosting remain future work chosen from executable evidence rather than compatibility commitments.

Packages

  • @silklang/compiler — the stage-0 compiler, evaluator, LLVM backend, direct WebAssembly backend, embedded Silk standard library, and supported analysis facade.
  • @silklang/cli — project initialization, checking, multi-target builds, native execution, formatting, and documentation generation through silk.
  • @silklang/llvm — Effect-native LLVM IR construction and deterministic text and bitcode emission.
  • @silklang/wasm — deterministic WebAssembly module construction and binary emission.
  • @silklang/editor-support — portable CodeMirror integration, TextMate grammar, semantic editor projections, and the <silk-snippet> custom element.
  • @silklang/lsp — project-aware diagnostics, hover, navigation, completion, inlay hints, symbols, and canonical formatting over stdio.
  • @silklang/docgen — CommonMark documentation models, semantic links, highlighting, doctesting, deterministic JSON, and static-site rendering.
  • silk-language — the private Cursor/VS Code extension app.

Evidence and direction

The compiler is exercised by seven familiar algorithms plus Silk-written lexer and bounded stack VM pressure programs. Their acceptance gates compare evaluation, native LLVM, and direct WebAssembly behavior, including allocation-failure rollback and fresh-process determinism.

Current specifications live under openspec/specs; active changes live under openspec/changes, and completed design records live under openspec/changes/archive.

Development

pnpm install
pnpm dev
pnpm build
pnpm check
pnpm release:candidate

pnpm dev runs package compilers in watch mode alongside the documentation app. pnpm build creates a dependency-ordered production build of every workspace package and app.

Effect-returning tests use it.effect from @effect/vitest; pure tests use ordinary it with assert. Package-facing changes require a Changesets entry and a validated packed release candidate.

License

MIT © 2026 Julia Ortiz

About

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages