Skip to content

Commit b39de55

Browse files
[release] v0.0.13 (#139)
* bump versions * add wasm build command * nits * add wasmpack to CI * add wasm pack to setup * use build.sh * debug build * use gcc * add prebuilt wasm approach
1 parent 7200003 commit b39de55

11 files changed

Lines changed: 35 additions & 26 deletions

File tree

.github/actions/setup/action.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,16 @@ runs:
4343
shell: bash
4444
run: |
4545
cargo install cargo-cache
46-
cargo cache --autoclean
46+
cargo cache --autoclean
47+
- name: Cache wasm-pack
48+
id: wasm-pack-cache
49+
uses: actions/cache@v4
50+
with:
51+
path: |
52+
~/.cargo/bin/wasm-pack
53+
~/AppData/Local/cargo/bin/wasm-pack.exe
54+
key: ${{ runner.os }}-wasm-pack-${{ steps.rust-version.outputs.rust_version }}
55+
- name: Install wasm-pack
56+
if: steps.wasm-pack-cache.outputs.cache-hit != 'true'
57+
shell: bash
58+
run: cargo install wasm-pack

.github/workflows/tests.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ jobs:
6161
steps:
6262
- name: Checkout repository
6363
uses: actions/checkout@v4
64+
- name: Get Rust version
65+
id: rust-version
66+
run: echo "rust_version=$(rustc --version)" >> "$GITHUB_OUTPUT"
67+
- name: Run setup
68+
uses: ./.github/actions/setup
6469
- name: Setup Node.js
6570
uses: actions/setup-node@v4
6671
with:
@@ -86,7 +91,5 @@ jobs:
8691
run: rustup target add wasm32-unknown-unknown
8792
- name: Build types
8893
run: cargo build --target wasm32-unknown-unknown --release --manifest-path types/Cargo.toml && du -h target/wasm32-unknown-unknown/release/alto_types.wasm
89-
- name: Install wasm-pack
90-
run: cargo install wasm-pack
9194
- name: Pack types
9295
run: wasm-pack build types --release --target web

Cargo.lock

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

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ members = [
88
resolver = "2"
99

1010
[workspace.dependencies]
11-
alto-client = { version = "0.0.12", path = "client" }
12-
alto-types = { version = "0.0.12", path = "types" }
11+
alto-client = { version = "0.0.13", path = "client" }
12+
alto-types = { version = "0.0.13", path = "types" }
1313
commonware-broadcast = { version = "0.0.57" }
1414
commonware-codec = { version = "0.0.57" }
1515
commonware-consensus = { version = "0.0.57" }

chain/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "alto-chain"
3-
version = "0.0.12"
3+
version = "0.0.13"
44
publish = true
55
edition = "2021"
66
license = "MIT OR Apache-2.0"

client/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "alto-client"
3-
version = "0.0.12"
3+
version = "0.0.13"
44
publish = true
55
edition = "2021"
66
license = "MIT OR Apache-2.0"

explorer/README.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,6 @@ export const LOCATIONS: [[number, number], string][] = [
2424
];
2525
```
2626

27-
## Compile `alto-types`
28-
29-
```bash
30-
cd ../types
31-
wasm-pack build --release --target web
32-
mv pkg/alto_types.js ../explorer/src/alto_types
33-
mv pkg/alto_types_bg.wasm ../explorer/src/alto_types
34-
cd ../explorer
35-
```
36-
3727
## Run the app
3828

3929
```bash
@@ -46,6 +36,8 @@ npm start
4636
npm run build
4737
```
4838

39+
_This will compile the WASM module from `alto-types` before building the React app._
40+
4941
## Run the production app
5042

5143
_Install `serve` if necessary: `npm install -g serve`._

explorer/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "alto-explorer",
3-
"version": "0.0.12",
3+
"version": "0.0.13",
44
"private": true,
55
"dependencies": {
66
"@types/node": "^16.18.126",
@@ -15,7 +15,9 @@
1515
},
1616
"scripts": {
1717
"start": "react-scripts start",
18-
"build": "react-scripts build"
18+
"build:wasm": "cd ../types && wasm-pack build --target web --out-dir ../explorer/src/alto_types --out-name alto_types",
19+
"build": "npm run build:wasm && react-scripts build",
20+
"build:react": "react-scripts build"
1921
},
2022
"eslintConfig": {
2123
"extends": [
@@ -46,4 +48,4 @@
4648
"devDependencies": {
4749
"@types/leaflet": "^1.9.16"
4850
}
49-
}
51+
}
0 Bytes
Binary file not shown.

inspector/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "alto-inspector"
3-
version = "0.0.12"
3+
version = "0.0.13"
44
publish = true
55
edition = "2021"
66
license = "MIT OR Apache-2.0"

0 commit comments

Comments
 (0)