diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..f4e8c00 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[build] +target = "wasm32-unknown-unknown" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..d0c2a72 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,25 @@ +name: CI + +on: + push: + +permissions: + contents: read + pages: write + id-token: write + +jobs: + build: + name: trunk build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Rust + uses: actions-rust-lang/setup-rust-toolchain@v1 + + - name: Setup trunk + uses: jetli/trunk-action@v0.5.0 + with: + version: 'latest' diff --git a/Cargo.toml b/Cargo.toml index d9d1119..1bb16f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,3 +33,9 @@ yewdux = "0.10.0" [build-dependencies] vergen-gitcl = "1.0.2" + +[profile.release] +panic = 'abort' +codegen-units = 1 +opt-level = 'z' +lto = true diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..414941b --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,5 @@ +[toolchain] +channel = "stable" +components = ["rustfmt", "cargo", "clippy"] +targets = ["wasm32-unknown-unknown"] +profile = "minimal" \ No newline at end of file