Rome, a Modern Toolchain!

Rate this content
Bookmark
Rome is a modern toolchain built in Rust, designed to replace multiple development tools such as Prettier, ESLint, and Webpack. It aims to simplify the management of tools by integrating functionalities into a single application. Rome offers high-quality diagnostics, providing detailed context and suggestions for fixes. It works seamlessly with IDEs and CLIs, including a VS Code extension. Rome's JSON schema is auto-generated from the source code, offering autocompletion and inline descriptions in the IDE. The toolchain is efficient and stable, suitable for large projects, and features a recoverable parser that can handle syntax errors. Rome also supports JavaScript and TypeScript, with plans to incorporate more languages and features.

From Author:

Modern JavaScript projects come in many shapes: websites, web applications, desktop apps, mobile apps, and more. For most of them, the common denominator is the technical debt that comes from settings up tools: bundlers, testing suite, code analysis, documentation, etc. I want to present you Rome, a toolchain that aims to be a all-in-one toolchain for the web, with one single tool you can maintain the health of all your projects!

This talk has been presented at JSNation 2023, check out the latest edition of this JavaScript Conference.

FAQ

Rome is a toolchain built in Rust, designed to replace multiple development tools such as Prettier, ESLint, Webpack, and others. It aims to provide high-quality diagnostics and work seamlessly with IDEs and CLIs.

Rome was created by Emmanuele, an Italian developer living in Ireland who has been working in open source for the last six years on projects like Webpack and now Rome.

The name 'Rome' is inspired by the famous phrases 'All roads lead to Rome' and 'Rome wasn't built in a day,' reflecting its comprehensive nature and the effort required to build it.

Rome offers a range of features including a formatter, linter, bundler, documentation generation, and code analyzer. It aims to replace many existing tools with a single unified toolchain.

Rome aims to simplify configuration by consolidating multiple configuration files (e.g., Prettier, ESLint, Tailwind, tsconfig) into a single or a few files. It also provides a JSON schema for auto-completion and documentation.

No, Rome is not an aggregator like Create React App. Instead, it performs the operations itself, maintaining awareness of each tool within its toolchain to optimize performance and integration.

Rome provides high-quality diagnostics with meaningful error messages and detailed context. It also offers code actions and suggestions for fixes, aimed at improving the developer experience.

Yes, Rome features a recoverable parser that can continue parsing even when it encounters syntax errors. This allows it to format and lint broken code, providing diagnostics and suggested fixes.

Yes, Rome is designed to be extremely fast. Benchmark tests have shown it to process large repositories in milliseconds.

Currently, you cannot directly use custom rules from other libraries with Rome. However, there are ongoing community efforts to port rules from tools like ESLint to Rome.

Emanuele Stoppa
Emanuele Stoppa
31 min
01 Jun, 2023

Comments

Sign in or register to post your comment.

Video Transcription

1. Introduction to Rome

Short description:

Today we'll talk about Rome. Rome is a toolchain meant to replace a lot of tools. It's built in Rust and provides high-quality diagnostics. It works on IDEs and CLIs. Rome aims to provide all the tools to maintain the health of your code base.

Hello, everyone. Today we'll talk about Rome. Have you heard of it? Well, if you haven't, this is the time.

Okay, so, ciao a tutti. Hello, everyone. Emmanuele, Italian. Living in Ireland for 12 years, so it's a long time. And I'm really passionate about open source. I've been working in open source for the last six years on Webpack and now Rome. You can call me Emma. Don't use my full name. It's too long. And nobody gets it right. And of course I make the core container of Rome.

Now, Rome is a toolchain. It's meant to replace a lot of tools that you know about. Pretier, Lint, Webpack, Lintstridge, and lots of them. So quite a lot of tools. It's built in Rust. And it's been written from developers to you guys, developers.

Now, let's go into it. Why Rome? Well, we have two things quite famous. All roads lead to Rome. And Rome wasn't built in a day. So this has a lot. Why modern? Because we want to provide high-quality diagnostics, so meaningful errors. And it must work on IDEs and CLIs, which are your tools of your daily jobs. And why a tool chain? Well, we want to provide all those tools that help you to maintain the health of your code base. Formatter, linter, bundler, documentation generation, analyzer in general. So we have a lot of tools and we aim to provide most of them all.

2. Configuration and JSON Schema

Short description:

Yeah, it's a lot, but we will get there. This is an example of a modern web project. You have to maintain separately all the files for each tool, but we aim to cut them down to just two files. Our JSON schema is auto-generated from the source code, providing documentation and auto-completion. We are not an aggregator of existing tools like create React app, which can slow down your work environment.

Yeah, it's a lot, but we will get there. So, taking all these definitions, now let's see what it actually means. So first of all, a config file through the mode. So this is an example of a modern web project. As you can see, we have a lot of files for each tool, ptr, eslint, tailwind, tsconfig. I mean, you know what I mean and there's a lot going on, you know.

You have to maintain separately all of them and we want to cut them all and have just two files, eventually also the log. So that's what we aim to. And it's an example of your configuration file. As you can see, from one file you can configure all the tools, all there, formatter, linter. We also have a JSON schema, which we deem really important because it's going to give you a lot of goodies, like, for example, auto-complications.

So this is a screenshot where I'm trying to type a rule inside the style group. And as you can see, I get the auto-completion. And as well, I get also a small description that tells me what the rule is about. So you don't need to go to the website and understand what's the rule about. your IDE and, I mean, go to DX. The also good thing is that our JSON schema is auto-generated from the source code. So we managed to document everything in our source code and spread the documentation through different channels, and the JSON schema is one of them. So this is an example, the line with, check that descriptions. And we have the same exact descriptions in our RUST file. That's a documentation comment. It's a special comment in the RUST codebase. And it's like a metadata that is attached to that type, the language. And with that metadata, we are able to provide the documentation for the JSON schema. And we are not an aggregator of existing tools. An example of an aggregator of existing tools is create React app. It aggregates lots of tools and they try to make them better for us. But it's difficult because everyone has different needs and configurations. So it takes a lot of energies and it slows down your work environment. And why? Well, I tell you why.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

The Future of Performance Tooling
JSNation 2022JSNation 2022
21 min
The Future of Performance Tooling
Top Content
Today's Talk discusses the future of performance tooling, focusing on user-centric, actionable, and contextual approaches. The introduction highlights Adi Osmani's expertise in performance tools and his passion for DevTools features. The Talk explores the integration of user flows into DevTools and Lighthouse, enabling performance measurement and optimization. It also showcases the import/export feature for user flows and the collaboration potential with Lighthouse. The Talk further delves into the use of flows with other tools like web page test and Cypress, offering cross-browser testing capabilities. The actionable aspect emphasizes the importance of metrics like Interaction to Next Paint and Total Blocking Time, as well as the improvements in Lighthouse and performance debugging tools. Lastly, the Talk emphasizes the iterative nature of performance improvement and the user-centric, actionable, and contextual future of performance tooling.
The Core of Turbopack Explained (Live Coding)
JSNation 2023JSNation 2023
29 min
The Core of Turbopack Explained (Live Coding)
Tobias Koppers introduces TurboPack and TurboEngine, addressing the limitations of Webpack. He demonstrates live coding to showcase the optimization of cache validation and build efficiency. The talk covers adding logging and memorization, optimizing execution and tracking dependencies, implementing invalidation and watcher, and storing and deleting invalidators. It also discusses incremental compilation, integration with other monorepo tools, error display, and the possibility of a plugin system for Toolpag. Lastly, the comparison with Bunn's Builder is mentioned.
Server Components with Bun
Node Congress 2023Node Congress 2023
7 min
Server Components with Bun
Top Content
Bun is a modern JavaScript runtime environment that combines a bundler, transpiler, package manager, and runtime. It offers faster installation of NPM packages and execution of package.json scripts. Bun introduces a new JavaScript and TypeScript bundler with built-in support for server components, enabling easy RPC with the client. This allows for code splitting and running code that streamingly renders React or any other library from the server and mixes it with client code, resulting in less JavaScript sent to the client.
Improving Developer Happiness with AI
React Summit 2023React Summit 2023
29 min
Improving Developer Happiness with AI
Watch video: Improving Developer Happiness with AI
GitHub Copilot is an auto-completion tool that provides suggestions based on context. Research has shown that developers using Copilot feel less frustrated, spend less time searching externally, and experience less mental effort on repetitive tasks. Copilot can generate code for various tasks, including adding modals, testing, and refactoring. It is a useful tool for improving productivity and saving time, especially for junior developers and those working in unfamiliar domains. Security concerns have been addressed with optional data sharing and different versions for individuals and businesses.
Static Analysis in JavaScript: What’s Easy and What’s Hard
JSNation 2023JSNation 2023
23 min
Static Analysis in JavaScript: What’s Easy and What’s Hard
Static analysis in JavaScript involves analyzing source code without executing it, producing metrics, problems, or warnings. Data flow analysis aims to determine the values of data in a program. Rule implementation in JavaScript can be straightforward or require extensive consideration of various cases and parameters. JavaScript's dynamic nature and uncertainty make static analysis challenging, but it can greatly improve code quality.
Automate the Browser With Workers Browser Rendering API
JSNation 2024JSNation 2024
20 min
Automate the Browser With Workers Browser Rendering API
The Talk discusses browser automation using the Worker's Browser Rendering API, which allows tasks like navigating websites, taking screenshots, and creating PDFs. Cloudflare integrated Puppeteer with their workers to automate browser tasks, and their browser rendering API combines remote browser isolation with Puppeteer. Use cases for the API include taking screenshots, generating PDFs, automating web applications, and gathering performance metrics. The Talk also covers extending sessions and performance metrics using Durable Objects. Thank you for attending!

Workshops on related topic

Solve 100% Of Your Errors: How to Root Cause Issues Faster With Session Replay
JSNation 2023JSNation 2023
44 min
Solve 100% Of Your Errors: How to Root Cause Issues Faster With Session Replay
WorkshopFree
Ryan Albrecht
Ryan Albrecht
You know that annoying bug? The one that doesn’t show up locally? And no matter how many times you try to recreate the environment you can’t reproduce it? You’ve gone through the breadcrumbs, read through the stack trace, and are now playing detective to piece together support tickets to make sure it’s real.
Join Sentry developer Ryan Albrecht in this talk to learn how developers can use Session Replay - a tool that provides video-like reproductions of user interactions - to identify, reproduce, and resolve errors and performance issues faster (without rolling your head on your keyboard).