Skip to content

Update README #1294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

mjoerussell
Copy link
Contributor

  • Added more information about Slang to the README including basic usage/core concepts, installation and contributing guides, and some background about the purpose of Slang.
  • Added more info to the contributor's guide about some of the projects in the repository, specifically metaslang/* and codegen/*

github-actions added 3 commits March 31, 2025 10:21
…elp users find more info.

Renamed `DEVELOPMENT.md` to `CONTRIBUTING.md` to make it a bit more clear what it's used for.
…a relative link so that it will work properly when reposted to other locations.
@mjoerussell mjoerussell requested review from a team as code owners March 31, 2025 15:38
Copy link

changeset-bot bot commented Mar 31, 2025

⚠️ No Changeset found

Latest commit: 0d39fd5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

@ggiraldez ggiraldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some suggestions.

README.md Outdated
@@ -15,6 +15,86 @@
A modular set of compiler APIs empowering the next generation of Solidity code analysis and developer tooling.
Written in Rust and distributed in multiple languages.

Slang analyzes Solidity source code and generates a rich concrete syntax tree (CST) that can be reasoned about. This is a departure from the classic approach of "black-box" compilers, which are handed the input and only their output can be observed.

Slang is not a replacement for solc, the standard Solidity compiler. We do not plan at the moment to support emitting optimized EVM bytecode for use in production. It does not perform formal verification of contracts or Solidity logic in general. However, other tools that serve this purpose are intended to be built on top of it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Slang is not a replacement for solc, the standard Solidity compiler. We do not plan at the moment to support emitting optimized EVM bytecode for use in production. It does not perform formal verification of contracts or Solidity logic in general. However, other tools that serve this purpose are intended to be built on top of it.
Slang is not a replacement for solc, the standard Solidity compiler. We do not plan at the moment to support emitting optimized EVM bytecode for use in production. It does not perform formal verification of contracts or Solidity logic in general. However, it is designed to empower such tools to be built on top of it.

README.md Outdated
yarn add "@nomicfoundation/slang"
```

Although Slang is written in Rust, we do not currently support the usage of Slang as a standalone crate.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest removing this for now, since we are not actively discouraging people from using Rust+giving feedback. It is just that the API is not finalized yet.

Suggested change
Although Slang is written in Rust, we do not currently support the usage of Slang as a standalone crate.

README.md Outdated

Although Slang is written in Rust, we do not currently support the usage of Slang as a standalone crate.

[Learn more about how to get started with Slang.](https://nomicfoundation.github.io/slang/latest/user-guide/04-getting-started/01-installation/)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest placing this link (and others like it) in a bullet to indent/for visibility.

Suggested change
[Learn more about how to get started with Slang.](https://nomicfoundation.github.io/slang/latest/user-guide/04-getting-started/01-installation/)
- [Learn more about how to get started with Slang.](https://nomicfoundation.github.io/slang/latest/user-guide/04-getting-started/01-installation/)

Copy link
Contributor

@OmarTawfik OmarTawfik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few suggestions. Otherwise, looks great!
Thanks for working on this...

@@ -15,6 +15,86 @@
A modular set of compiler APIs empowering the next generation of Solidity code analysis and developer tooling.
Written in Rust and distributed in multiple languages.

Slang analyzes Solidity source code and generates a rich concrete syntax tree (CST) that can be reasoned about. This is a departure from the classic approach of "black-box" compilers, which are handed the input and only their output can be observed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once it is approved, let's sync the contents with other _PRODUCT_README_ markers...

@@ -15,6 +15,86 @@
A modular set of compiler APIs empowering the next generation of Solidity code analysis and developer tooling.
Written in Rust and distributed in multiple languages.

Slang analyzes Solidity source code and generates a rich concrete syntax tree (CST) that can be reasoned about. This is a departure from the classic approach of "black-box" compilers, which are handed the input and only their output can be observed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYT of adding a short code example (10-20 lines) on how to use the public API?

Copy link
Contributor

@ggiraldez ggiraldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Left a couple of questions.

## Solidity compiler tooling by [@NomicFoundation](https://github.com/NomicFoundation)

A modular set of compiler APIs empowering the next generation of Solidity code analysis and developer tooling.
Written in Rust and distributed in multiple languages.

Slang analyzes Solidity source code and generates a rich concrete syntax tree (CST) that can be reasoned about. This is a departure from the classic approach of "black-box" compilers, which are handed the input and only their output can be observed.

```ts
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason why the example is present in all READMEs except the root one?

Also, while I like that this example is short, it only shows a very small fraction of Slang's capabilities. Do we want to showcase more?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason why the example is present in all READMEs except the root one?

Not sure, just an oversight while I was trying to sync up all the READMEs.

Also, while I like that this example is short, it only shows a very small fraction of Slang's capabilities. Do we want to showcase more?

IMO it's okay to be brief on the "front page" of the project. It's not a user guide, it's an introduction. I'm not attached to this particular example so if you have a better one I'm happy to swap it out; however, I think being superficial is fine here. Showing off (and explaining) all Slang's features is what the user guide is for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants