ReScript HomeReScript Home
DocsPlaygroundBlogCommunityPackages
  • Playground
  • Blog
  • Community
  • Packages
  • X
  • Bluesky
  • GitHub
  • Forum
Language ManualAPISyntax LookupReact
v11v9.1 - v10.1v8.2 - v9.0v6.0 - v8.1
Overview
  • Introduction
  • Installation
  • Editor
  • LLMs
  • Migrate to v12
Guides
  • Converting from JS
  • Dead Code Analysis in ReScript
  • Project Structure
Language Features
  • Overview
  • Let Binding
  • Type
  • Primitive Types
  • Tuple
  • Record
  • Object
  • Dictionary
  • Variant
  • Polymorphic Variant
  • Null, Undefined and Option
  • Array & List
  • Function
  • If-Else & Loops
  • Pipe
  • Pattern Matching / Destructuring
  • Mutation
  • JSX
  • Exception
  • Lazy Value
  • Promises
  • Async / Await
  • Tagged templates
  • Module
  • Import & Export
  • Attribute (Decorator)
  • Reserved Keywords
  • Equality and Comparison
JavaScript Interop
  • Interop Cheatsheet
  • Embed Raw JavaScript
  • Shared Data Types
  • External (Bind to Any JS Library)
  • Bind to JS Object
  • Bind to JS Function
  • Import from / Export to JS
  • Bind to Global JS Values
  • JSON
  • Inlining Constants
  • Use Illegal Identifier Names
  • Generate Converters & Helpers
  • Browser Support & Polyfills
  • Libraries & Publishing
  • TypeScript
Build System
  • Overview
  • Configuration
  • Configuration Schema
  • External Stdlib
  • Setting up a monorepo
  • Interop with JS Build Systems
  • Performance
  • Warning Numbers
Advanced Features
  • Extensible Variant
  • Scoped Polymorphic Types
  • Module Functions
  • Generalized Algebraic Data Types
Docs / Language Manual / Build-overview
Edit

Build System Overview

ReScript comes with a build system, rescript, that's fast, lean and used as the authoritative build system of the community.

Every ReScript project needs a build description file, rescript.json.

Options

See rescript help:

❯ rescript help Usage: rescript <options> <subcommand> `rescript` is equivalent to `rescript build` Options: -v, -version display version number -h, -help display help Subcommands: build clean format convert dump help Run `rescript <subcommand> -h` for subcommand help. Examples: rescript build -h rescript format -h

Build Project

Each build will create build artifacts from your project's source files.

To build a project (including its dependencies), run:

SH
rescript

Which is an alias for rescript build.

To keep a build watcher, run:

SH
rescript -w

Any new file change will be picked up and the build will re-run.

Note: third-party libraries in node_modules aren't watched, as doing so may exceed the node.js watcher count limit.

For monorepo setup in ReScript 12+, see Setting up a monorepo.

Clean Project

If you ever get into a stale build for edge-case reasons, use:

SH
rescript clean

Compile with stricter errors in CI

Since 11.1

You may want to compile your project with stricter rules for production, than when developing. With the -warn-error build flag, this can easily be done, for instance in a continuous integration script. E.g.:

SH
rescript -warn-error +110

Here, warning number 110, which is triggered when a %todo has been found, gets promoted to an error. The full list of warning numbers can be found here.

© 2026 The ReScript Project

About
  • Community
  • ReScript Association
Find us on