Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
be0c864
wip
yuvalkom-M Mar 18, 2026
ecd4319
Merge branch 'main' of https://github.com/sequentech/step into feat/m…
yuvalkom-M Mar 18, 2026
b4f5e6c
fix sequent-core flex.nix and ballot.rs clippy errors
yuvalkom-M Mar 18, 2026
455c0f8
build sequent-core
yuvalkom-M Mar 19, 2026
17bbbd3
wip
yuvalkom-M Mar 19, 2026
4ee6a16
Merge branch 'main' of https://github.com/sequentech/step into feat/m…
yuvalkom-M Mar 19, 2026
73a1ece
fix flake.nix
yuvalkom-M Mar 19, 2026
f5f3c88
wip
yuvalkom-M Mar 19, 2026
c7e4a2d
wip
yuvalkom-M Mar 22, 2026
0a71c2a
wip
yuvalkom-M Mar 23, 2026
2f65464
wip
yuvalkom-M Mar 23, 2026
b4de509
wip
yuvalkom-M Mar 23, 2026
f662352
wip
yuvalkom-M Mar 24, 2026
563f862
wip
yuvalkom-M Mar 24, 2026
844b2f9
wip
yuvalkom-M Mar 24, 2026
2b215cd
wip
yuvalkom-M Mar 25, 2026
0930696
wip
yuvalkom-M Mar 25, 2026
a8e6b1c
wip
yuvalkom-M Mar 26, 2026
112abd3
wip
yuvalkom-M Mar 26, 2026
e6a31bf
Merge branch 'main' of https://github.com/sequentech/step into feat/m…
yuvalkom-M Mar 26, 2026
cf7feb6
wip
yuvalkom-M Mar 26, 2026
6a7023f
wip
yuvalkom-M Mar 26, 2026
c4fa1a1
wip
yuvalkom-M Mar 26, 2026
a1b7882
wip
yuvalkom-M Mar 26, 2026
604fc82
Merge branch 'main' of https://github.com/sequentech/step into feat/m…
yuvalkom-M Mar 29, 2026
d15c10c
improve cargo doc
Findeton Apr 13, 2026
969b985
add missing file
Findeton Apr 14, 2026
33f0e23
add missings docs and lints config to the readme
yuvalkom-M Apr 14, 2026
cffa951
add vscode task for checking code and add missing docs
yuvalkom-M Apr 15, 2026
8372300
add to rust format gh action step for cargo clippy
yuvalkom-M Apr 15, 2026
49797cf
fix lint gh action
yuvalkom-M Apr 15, 2026
448ba97
fix clippy errors
yuvalkom-M Apr 15, 2026
2edc13f
add cargo docs to GH action for docs
yuvalkom-M Apr 15, 2026
4bb57f5
fix docs gh action & Copilot pr review comments
yuvalkom-M Apr 15, 2026
411907b
add rust docs links to docusaurus
yuvalkom-M Apr 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .devcontainer/scripts/check-code.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash -i
# SPDX-FileCopyrightText: 2026 Sequent Tech Inc <legal@sequentech.io>
#
# SPDX-License-Identifier: AGPL-3.0-only

set -e -o pipefail

source .devcontainer/.env

# check hasura formatting (prettier --check)
cd hasura/
yarn && yarn prettify

# check rust formatting
cd ../packages/
cargo fmt -- --check

# clippy for sequent-core (all features; warnings allowed)
export CARGO_TARGET_DIR="$(pwd)/rust-local-target"
cd ./sequent-core/
cargo clippy --no-deps --all-features -- -A warnings

# check Typescript lint & formatting
cd ..
yarn
yarn lint
yarn prettify

# check java formatting (spotless)
cd ./keycloak-extensions
mvn invoker:run@run-spotless-check
25 changes: 23 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ on:
- 'docs/docusaurus/**'
- 'docs/api/graphql/**'
- 'packages/graphql.schema.json'
- 'packages/**'
- '**/Cargo.toml'
- '**/Cargo.lock'
branches:
- main
- release/*
Expand All @@ -32,6 +35,9 @@ permissions:
jobs:
build:
runs-on: gcp-selfhosted-ubuntu24
env:
CARGO_TARGET_DIR: rust-local-target

steps:
- uses: actions/checkout@v4
with:
Expand All @@ -41,7 +47,15 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 22.x


- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Generate cargo docs for sequent-core
working-directory: ./packages
run: |
cargo doc -p sequent-core --all-features --no-deps

- name: Set BASE_URL and Build Docusaurus Preview
id: build_docusaurus
working-directory: ./docs/docusaurus
Expand All @@ -64,7 +78,14 @@ jobs:
yarn install --frozen-lockfile
yarn generate-full-docs
ls -lah docs/
cp -r docs ../../docusaurus/build/graphql
mkdir -p ../../docusaurus/build/graphql
cp -r docs/* ../../docusaurus/build/graphql/

- name: Copy cargo doc output into published site
run: |
mkdir -p ./docs/docusaurus/build/rust
cp -r ./packages/${CARGO_TARGET_DIR}/doc/* ./docs/docusaurus/build/rust/
ls -lah ./docs/docusaurus/build/rust

- name: Install rsync
run: sudo apt-get update && sudo apt-get install -y rsync
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/lint_prettify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
dir: hasura/

rust-fmt:
name: Check Rust format
name: Check Rust format and linting
runs-on: gcp-selfhosted-ubuntu24
steps:
- name: Check out code
Expand All @@ -87,11 +87,14 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.90.0
components: rustfmt
components: rustfmt,clippy
targets: x86_64-unknown-linux-musl

- name: Check Rust code formatting
run: cd packages/ && cargo fmt -- --check

- name: Check Rust Sequent Core Clippy
run: cd packages/sequent-core && cargo clippy --no-deps --all-features -- -A warnings

java-spotless:
name: Check Java format
Expand Down
24 changes: 24 additions & 0 deletions .vscode/tasks.shared.json
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,30 @@
},
"problemMatcher": []
},
{
"label": "check.code",
"command": "devenv",
"args": [
"shell",
"bash",
"--",
"-c",
"./.devcontainer/scripts/check-code.sh"
],
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "dedicated",
"showReuseMessage": true,
"clear": false
},
"isBackground": false,
"runOptions": {
"runOn": "default"
},
"problemMatcher": []
},
{
"label": "build.sequent-core",
"type": "shell",
Expand Down
114 changes: 114 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,3 +390,117 @@ when running in the terminal `devenv shell` or in the `Rebuild Container` vscode

[cargo workspace]: https://doc.rust-lang.org/cargo/reference/workspaces.html
[yarn workspace]: https://yarnpkg.com/features/workspaces


## 🧹 Linting & Code Quality Guide

This project enforces strict linting rules using Rust built-in lints and Clippy to ensure high code quality, safety, and maintainability.

### 🚀 Running Clippy

Run lint checks locally with:

```bash
cargo clippy --no-deps --all-features -- -A warnings
```

Explanation
--no-deps: Lints only this workspace (skips dependencies)
--all-features: Ensures all feature-gated code is checked
-- -A warnings: Allows warnings (only errors will fail)

- Note: This is convenient for development, but CI should be stricter.

### Lint Configuration

Lint rules are defined in Cargo.toml under [lints.*].

#### Rustdoc Lints

The `[lints.rustdoc]` section enforces documentation quality and correctness.

- `missing_crate_level_docs = "deny"`
Requires top-level crate documentation (e.g. `//!` or `#![doc = include_str!(...)]`).

- `broken_intra_doc_links = "deny"`
Prevents broken links between documentation items (e.g. invalid `[`TypeName`]` references).

#### Rust Lints

The `[lints.rust]` section configures core compiler lints to enforce safety, correctness, and good API design.

- `missing_docs = "deny"`
Requires documentation for all public items (structs, enums, functions, etc.).

- `unsafe_code = "forbid"`
Completely disallows usage of `unsafe` code anywhere in the crate.

- `private_interfaces = "warn"`
Warns when a public item exposes private types in its interface.

- `private_bounds = "warn"`
Warns when trait bounds reference private types that are not accessible to users.

- `unnameable_types = "warn"`
Warns when types are exposed that cannot be named or used properly outside the crate.

- `unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage,coverage_nightly)'] }`
Warns about unknown or unexpected `cfg` conditions and ensures only allowed configuration flags (like `coverage`) are used.

#### Clippy Lints

The `[lints.clippy]` section configures additional lint rules provided by Clippy. In this project, these rules are set very strictly to enforce safer, clearer, and more maintainable Rust code.

- `missing_docs_in_private_items = "deny"`
Requires documentation not only for public items, but also for private structs, enums, functions, constants, and fields.

- `missing_errors_doc = "deny"`
Requires a `# Errors` section in the documentation of functions that return `Result`.

- `missing_panics_doc = "deny"`
Requires a `# Panics` section in the documentation of functions that may panic.

- `doc_markdown = "deny"`
Enforces proper Markdown formatting in documentation comments.

- `unwrap_used = "deny"`
Disallows use of `.unwrap()` because it may panic.

- `panic = "deny"`
Disallows explicit `panic!()` calls.

- `shadow_unrelated = "deny"`
Disallows reusing variable names in unrelated scopes when it may reduce readability.

- `print_stdout = "deny"`
Disallows `println!` and similar macros for standard output.

- `print_stderr = "deny"`
Disallows `eprintln!` and similar macros for standard error output.

- `indexing_slicing = "deny"`
Disallows direct indexing and slicing like `arr[i]` because they may panic at runtime.

- `missing_const_for_fn = "deny"`
Requires functions to be marked `const` when they can be.

- `future_not_send = "deny"`
Warns when async code creates futures that are not `Send`, which can break multi-threaded async execution.

- `arithmetic_side_effects = "deny"`
Flags arithmetic operations that may overflow or have unintended side effects.

- `suspicious = "deny"`
Enables Clippy’s suspicious code lints to catch code that is likely incorrect.

- `complexity = "deny"`
Enables lints that detect overly complex code patterns and suggests simpler alternatives.

- `style = "deny"`
Enforces idiomatic Rust style.

- `perf = "deny"`
Enables performance-related lints to catch inefficient code patterns.

- `pedantic = "deny"`
Enables a very strict set of extra Clippy lints for code quality, readability, and correctness. These are more opinionated than the default lints.
25 changes: 25 additions & 0 deletions docs/docusaurus/docs/rust-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
id: rust_docs
title: Rust Docs
sidebar_position: -1
---

import useBaseUrl from '@docusaurus/useBaseUrl';

<!--
-- SPDX-FileCopyrightText: 2026 Sequent Tech Inc <legal@sequentech.io>
SPDX-License-Identifier: AGPL-3.0-only
-->

export const RustCrateLink = ({ path, children }) => {
const url = useBaseUrl(path);
return (
<a href={url} target="_blank" rel="noreferrer noopener">
{children}
</a>
);
};

### Crates

- <RustCrateLink path="/rust/sequent_core/index.html">sequent-core</RustCrateLink>
33 changes: 33 additions & 0 deletions docs/docusaurus/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,33 @@ const config = {
sidebarPath: require.resolve('./sidebars.js'),
editUrl:
'https://github.com/sequentech/step/edit/main/docs/docusaurus',
async sidebarItemsGenerator({
defaultSidebarItemsGenerator,
...args
}) {
const sidebarItems = await defaultSidebarItemsGenerator(args);

function removeDoc(items) {
return items
.filter((item) => {
if (item.type === 'doc' && item.id === 'rust_docs') {
return false;
}
return true;
})
.map((item) => {
if (item.type === 'category' && item.items) {
return {
...item,
items: removeDoc(item.items),
};
}
return item;
});
}

return removeDoc(sidebarItems);
},
},
// completely remove the blog
blog: false,
Expand Down Expand Up @@ -78,6 +105,12 @@ const config = {
position: 'left',
target: '_blank',
},
{
type: 'doc',
docId: 'rust_docs',
label: 'Rust Docs',
position: 'left',
},
{
href: 'https://github.com/sequentech',
label: 'GitHub',
Expand Down
Loading
Loading