Skip to content

Commit af8cfcf

Browse files
committed
Initial commit
0 parents  commit af8cfcf

File tree

11 files changed

+684
-0
lines changed

11 files changed

+684
-0
lines changed

.cargo/config.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[build]
2+
target = "wasm32-wasip1"
3+
rustflags = [
4+
# The auto splitting runtime supports all the following WASM features.
5+
"-C", "target-feature=+bulk-memory,+mutable-globals,+nontrapping-fptoint,+sign-ext,+simd128,+relaxed-simd,+tail-call",
6+
]

.github/workflows/build.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Build
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- 'master'
8+
tags:
9+
- '*'
10+
11+
jobs:
12+
build:
13+
name: Build
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
steps:
18+
- name: Checkout Commit
19+
uses: actions/checkout@v4
20+
21+
- name: Install Rust
22+
uses: hecrj/setup-rust-action@v2
23+
with:
24+
rust-version: stable
25+
targets: wasm32-wasip1
26+
27+
- name: Build
28+
run: |
29+
cargo b --release
30+
31+
- name: Release
32+
if: github.ref == 'refs/heads/master'
33+
uses: softprops/action-gh-release@v2
34+
with:
35+
files: target/wasm32-wasip1/release/se1_auto_splitter.wasm
36+
name: Latest
37+
tag_name: latest
38+
body: This contains the latest version of the auto splitter.
39+
40+
clippy:
41+
name: Check clippy lints
42+
runs-on: ubuntu-latest
43+
steps:
44+
- name: Checkout Commit
45+
uses: actions/checkout@v4
46+
47+
- name: Install Rust
48+
uses: hecrj/setup-rust-action@v2
49+
with:
50+
components: clippy
51+
targets: wasm32-wasip1
52+
53+
- name: Run Clippy
54+
run: cargo clippy --all-features
55+
56+
format:
57+
name: Check formatting
58+
runs-on: ubuntu-latest
59+
steps:
60+
- name: Checkout Commit
61+
uses: actions/checkout@v4
62+
63+
- name: Install Rust
64+
uses: hecrj/setup-rust-action@v2
65+
with:
66+
components: rustfmt
67+
68+
- name: Run cargo fmt
69+
run: cargo fmt -- --check || true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target

.vscode/extensions.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"vadimcn.vscode-lldb",
4+
"rust-lang.rust-analyzer"
5+
]
6+
}

.vscode/launch.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "lldb",
6+
"request": "launch",
7+
"name": "Debug Auto Splitter",
8+
// Install the asr-debugger with:
9+
// cargo install --locked --git https://github.com/LiveSplit/asr-debugger
10+
"program": "asr-debugger",
11+
"args": [
12+
"--debug",
13+
"target${pathSeparator}wasm32-wasip1${pathSeparator}debug${pathSeparator}se1_auto_splitter.wasm"
14+
],
15+
"cwd": "${workspaceFolder}"
16+
}
17+
]
18+
}

.vscode/tasks.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "cargo",
6+
"command": "b",
7+
"problemMatcher": [
8+
"$rustc",
9+
"$rust-panic"
10+
],
11+
"group": "build",
12+
"label": "Build Auto Splitter (Debug)"
13+
},
14+
{
15+
"type": "cargo",
16+
"command": "b",
17+
"args": [
18+
"--release"
19+
],
20+
"problemMatcher": [
21+
"$rustc",
22+
"$rust-panic"
23+
],
24+
"group": "build",
25+
"label": "Build Auto Splitter (Release)"
26+
},
27+
{
28+
"type": "cargo",
29+
// Install the `cargo watch` subcommand from here:
30+
// https://github.com/watchexec/cargo-watch?tab=readme-ov-file#install
31+
"command": "watch",
32+
"args": [
33+
"-x",
34+
"b"
35+
],
36+
"problemMatcher": [
37+
"$rustc",
38+
"$rust-panic"
39+
],
40+
"label": "Watch Auto Splitter"
41+
},
42+
]
43+
}

Cargo.lock

Lines changed: 249 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)