Skip to content

Commit a2fbd9d

Browse files
committed
feat: initial release v0.1.0
0 parents  commit a2fbd9d

3,005 files changed

Lines changed: 375349 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
tests/** linguist-vendored=true
2+
tools/bindgen/tests/** linguist-vendored=true
3+
editors/** linguist-vendored=true
4+
fuzz/** linguist-vendored=true
5+
justfile linguist-vendored=true

.github/workflows/ci.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Setup:
2+
name: CI
3+
4+
on:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: [main]
9+
workflow_dispatch:
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
13+
cancel-in-progress: false
14+
15+
permissions:
16+
contents: read
17+
18+
env:
19+
CARGO_INCREMENTAL: 0
20+
CARGO_TERM_COLOR: always
21+
RUST_BACKTRACE: 1
22+
23+
jobs:
24+
pr-title:
25+
name: Conventional commit PR title
26+
if: github.event_name == 'pull_request'
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Check PR title
30+
env:
31+
PR_TITLE: ${{ github.event.pull_request.title }}
32+
CONVENTIONAL_COMMIT_REGEX: '^(feat|fix|refactor|test|docs|chore|ci|perf|build)(\(.+\))?!?: [a-z].*'
33+
run: |
34+
if ! echo "$PR_TITLE" | grep -qE "$CONVENTIONAL_COMMIT_REGEX"; then
35+
echo "PR title: $PR_TITLE"
36+
echo ""
37+
echo "PR title must follow Conventional Commits: <type>: <description>"
38+
echo "Types: feat, fix, refactor, test, docs, chore, ci, perf, build"
39+
exit 1
40+
fi
41+
LEN=$(echo -n "$PR_TITLE" | wc -c | tr -d ' ')
42+
if [ "$LEN" -gt 72 ]; then
43+
echo "PR title is $LEN chars (max 72)"
44+
exit 1
45+
fi
46+
47+
check:
48+
name: Check
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v6
52+
53+
- uses: dtolnay/rust-toolchain@stable
54+
with:
55+
components: rustfmt, clippy
56+
57+
- uses: actions/setup-go@v6
58+
with:
59+
go-version: "1.25"
60+
cache: false
61+
62+
- uses: extractions/setup-just@v3
63+
64+
- uses: Swatinem/rust-cache@v2
65+
with:
66+
save-if: ${{ github.ref == 'refs/heads/main' }}
67+
68+
- name: Check formatting
69+
run: just format-check
70+
71+
- name: Lint
72+
run: just lint
73+
74+
- name: Test
75+
run: NO_COLOR=1 cargo test -p tests --test suite -- --format terse
76+
77+
- name: Build
78+
run: just build
79+
80+
- name: Check stdlib
81+
run: just check-stdlib-typedefs
82+
83+
- name: E2E tests
84+
run: just test-e2e
85+
86+
- name: Test prelude Go module
87+
run: cd prelude && go test ./...
88+
89+
- uses: taiki-e/install-action@cargo-shear
90+
91+
- name: Check unused dependencies
92+
run: cargo shear

.github/workflows/fuzz.yml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
name: Fuzz
2+
on:
3+
schedule:
4+
- cron: "0 4 * * *"
5+
workflow_dispatch:
6+
7+
jobs:
8+
fuzz-parse:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v6
12+
13+
- uses: dtolnay/rust-toolchain@nightly
14+
15+
- uses: Swatinem/rust-cache@v2
16+
with:
17+
workspaces: fuzz -> target
18+
19+
- name: Cache cargo-fuzz binary
20+
id: cache-cargo-fuzz
21+
uses: actions/cache@v5
22+
with:
23+
path: ~/.cargo/bin/cargo-fuzz
24+
key: cargo-fuzz-0.13.1
25+
26+
- name: Install cargo-fuzz
27+
if: steps.cache-cargo-fuzz.outputs.cache-hit != 'true'
28+
run: cargo install cargo-fuzz --version 0.13.1 --locked
29+
30+
- name: Restore fuzz-parse corpus
31+
uses: actions/cache/restore@v5
32+
with:
33+
path: fuzz/corpus/parse
34+
key: fuzz-corpus-parse
35+
36+
- uses: extractions/setup-just@v3
37+
38+
- name: Minimize fuzz-parse corpus
39+
run: cargo +nightly fuzz cmin parse -- -rss_limit_mb=2048
40+
41+
- name: Fuzz parse
42+
run: just fuzz-parse
43+
44+
- name: Save fuzz-parse corpus
45+
if: always()
46+
uses: actions/cache/save@v5
47+
with:
48+
path: fuzz/corpus/parse
49+
key: fuzz-corpus-parse-${{ github.run_id }}
50+
51+
- name: Upload crash artifacts
52+
if: failure()
53+
uses: actions/upload-artifact@v6
54+
with:
55+
name: fuzz-crash-parse
56+
path: fuzz/artifacts/
57+
58+
fuzz-infer:
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: actions/checkout@v6
62+
63+
- uses: dtolnay/rust-toolchain@nightly
64+
65+
- uses: Swatinem/rust-cache@v2
66+
with:
67+
workspaces: fuzz -> target
68+
69+
- name: Cache cargo-fuzz binary
70+
id: cache-cargo-fuzz
71+
uses: actions/cache@v5
72+
with:
73+
path: ~/.cargo/bin/cargo-fuzz
74+
key: cargo-fuzz-0.13.1
75+
76+
- name: Install cargo-fuzz
77+
if: steps.cache-cargo-fuzz.outputs.cache-hit != 'true'
78+
run: cargo install cargo-fuzz --version 0.13.1 --locked
79+
80+
- name: Restore fuzz-infer corpus
81+
uses: actions/cache/restore@v5
82+
with:
83+
path: fuzz/corpus/infer
84+
key: fuzz-corpus-infer
85+
86+
- uses: extractions/setup-just@v3
87+
88+
- name: Minimize fuzz-infer corpus
89+
run: cargo +nightly fuzz cmin infer -- -rss_limit_mb=2048
90+
91+
- name: Fuzz infer
92+
run: just fuzz-infer
93+
94+
- name: Save fuzz-infer corpus
95+
if: always()
96+
uses: actions/cache/save@v5
97+
with:
98+
path: fuzz/corpus/infer
99+
key: fuzz-corpus-infer-${{ github.run_id }}
100+
101+
- name: Upload crash artifacts
102+
if: failure()
103+
uses: actions/upload-artifact@v6
104+
with:
105+
name: fuzz-crash-infer
106+
path: fuzz/artifacts/

.github/workflows/release.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
# push:
6+
# branches:
7+
# - main
8+
9+
jobs:
10+
# prepare:
11+
# name: Prepare release PR
12+
# runs-on: ubuntu-latest
13+
# permissions:
14+
# contents: write
15+
# pull-requests: write
16+
# concurrency:
17+
# group: release-plz-${{ github.ref }}
18+
# cancel-in-progress: false
19+
# steps:
20+
# - uses: actions/checkout@v6
21+
# with:
22+
# fetch-depth: 0
23+
#
24+
# - uses: dtolnay/rust-toolchain@stable
25+
#
26+
# - uses: release-plz/action@v0.5
27+
# with:
28+
# command: release-pr
29+
# env:
30+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
32+
publish:
33+
name: Publish prelude to Go proxy and compiler to crates.io
34+
runs-on: ubuntu-latest
35+
permissions:
36+
contents: write
37+
steps:
38+
- uses: actions/checkout@v6
39+
with:
40+
fetch-depth: 0
41+
42+
- uses: dtolnay/rust-toolchain@stable
43+
44+
- name: Tag and publish prelude Go module
45+
run: |
46+
COMPILER_VERSION=$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[] | select(.name == "lisette") | .version')
47+
git tag "prelude/v${COMPILER_VERSION}" 2>/dev/null || true
48+
git push origin "prelude/v${COMPILER_VERSION}"
49+
curl -sf "https://proxy.golang.org/github.com/ivov/lisette/prelude/@v/v${COMPILER_VERSION}.info" > /dev/null || true # warm proxy cache
50+
51+
- uses: release-plz/action@v0.5
52+
with:
53+
command: release
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.cargo
2+
/target
3+
.DS_Store
4+
tests/e2e/target/
5+
tools/bindgen/bin/*
6+
!tools/bindgen/bin/.gitkeep
7+
tools/bindgen/tests/coverage*
8+
editors/vscode/node_modules/
9+
editors/vscode/dist/
10+
editors/vscode/*.vsix

0 commit comments

Comments
 (0)