Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure kcmc builds on wasm32-unknown-unknown #529

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,21 @@ jobs:

- name: Check lints
run: just lint

check-wasm:
name: Check wasm
runs-on: ubuntu-latest-8-cores
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@just
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- uses: Swatinem/[email protected]

- name: Check lints
run: just check-wasm

cargo-fmt:
name: cargo fmt
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
clippy-flags := "--workspace --tests --benches --examples"

lint:
cargo clippy --workspace --tests --benches --examples --no-default-features -- -D warnings
cargo clippy --workspace --tests --benches --examples -- -D warnings
cargo clippy --workspace --tests --benches --examples --all-features -- -D warnings
cargo clippy {{clippy-flags}} --no-default-features -- -D warnings
cargo clippy {{clippy-flags}} -- -D warnings
cargo clippy {{clippy-flags}} --all-features -- -D warnings

check-wasm:
cargo check -p kittycad-modeling-cmds --target wasm32-unknown-unknown --features websocket

check-typos:
codespell --config .codespellrc
Expand Down
2 changes: 1 addition & 1 deletion modeling-cmds/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ serde = { version = "1.0.210", features = ["derive"] }
serde_bytes = "0.11.15"
serde_json = { version = "1.0.127", optional = true }
slog = { version = "2.7.0", optional = true }
uuid = { version = "1.10.0", features = ["serde"] }
uuid = { version = "1.10.0", features = ["serde", "v4", "js"] }
webrtc = { version = "0.11", optional = true }

[lints]
Expand Down
2 changes: 1 addition & 1 deletion modeling-session/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ uuid = { version = "1.10.0", features = ["v4"] }
[dev-dependencies]
color-eyre = "0.6"
image = "0.25.1"
tokio = { version = "1", features = ["rt", "macros", "rt-multi-thread"] }
tokio = { version = "1", features = ["rt", "macros"] }

[lints]
workspace = true
2 changes: 1 addition & 1 deletion modeling-session/examples/cube_png.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use uuid::Uuid;

const CUBE_WIDTH: LengthUnit = LengthUnit(100.0);

#[tokio::main]
#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<()> {
// Set up the API client.
let kittycad_api_token = env::var("KITTYCAD_API_TOKEN").context("You must set $KITTYCAD_API_TOKEN")?;
Expand Down
2 changes: 1 addition & 1 deletion modeling-session/examples/cube_png_batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use uuid::Uuid;

const CUBE_WIDTH: LengthUnit = LengthUnit(100.0);

#[tokio::main]
#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<()> {
// Set up the API client.
let kittycad_api_token = env::var("KITTYCAD_API_TOKEN").context("You must set $KITTYCAD_API_TOKEN")?;
Expand Down
2 changes: 1 addition & 1 deletion modeling-session/examples/lsystem_png_batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use kittycad_modeling_session::{Session, SessionBuilder};
use lsystem::{LSystem, MapRules};
use uuid::Uuid;

#[tokio::main]
#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<()> {
// Set up the API client.
let kittycad_api_token = env::var("KITTYCAD_API_TOKEN").context("You must set $KITTYCAD_API_TOKEN")?;
Expand Down
Loading