chemical.mod

Declare module type, sources, and imports for the Chemical compiler.

28|2|Updated Dec 24, 2023
One-click install
npx skills add https://github.com/chemicallang/chemical --skill chemical-mod
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: chemical.mod
Source: https://github.com/chemicallang/chemical/tree/main/.agents/skills/chemical_mod
Command: npx skills add https://github.com/chemicallang/chemical --skill chemical-mod

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Chemical.mod provides a concise, readable descriptor for module configuration that feeds the Chemical compiler with module type, dependencies, sources, and imports, replacing more verbose build setups.

Core Features & Use Cases

  • Declarative module definitions for both libraries and applications.
  • Supports source path expansion, local and remote imports, and version pinning.
  • Use Case: define a library module that exports a main function for an application, or a standalone library without a main.

Quick Start

Create application my_mod in a chemical.mod file and run chemical run chemical.mod to build and execute.

Frequently Asked Questions about chemical.mod

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define module configuration for the Chemical compiler?

Module configuration is defined using the chemical.mod file to declare module types, sources, and imports, replacing verbose build setups. This concise descriptor feeds the Chemical compiler directly for libraries and applications across multi-file projects.

What is the syntax to build a standalone library without a main function?

The library syntax in chemical.mod specifies a module type that exports functions without requiring a main entry point. This declarative module definition supports building standalone libraries for use across multi-file projects.

Can I use conditional and remote imports in a multi-file project build?

Conditional and remote imports are supported in multi-file projects through chemical.mod. The configuration allows source path expansion, relative imports, and version pinning to manage dependencies for library and application builds.

How do I build and execute an application using chemical.mod?

To build and execute an application, define it in a chemical.mod file and run the chemical run chemical.mod command. This processes the module configuration, compiles the sources, and executes the resulting application.

Does chemical.mod support linking semantics for application builds?

Linking semantics are supported via chemical.mod for application builds. The descriptor manages linking by declaring module types, source paths, and imports to connect library modules with standalone applications across multi-file projects.