Skip to content

Commit

Permalink
Add cli code, builds with cargo but not yet with wasm-pack
Browse files Browse the repository at this point in the history
  • Loading branch information
pierremtb committed May 9, 2024
1 parent a0f47da commit f4fb557
Show file tree
Hide file tree
Showing 13 changed files with 1,696 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ jobs:

- run: yarn install

- uses: Swatinem/rust-cache@v2
with:
workspaces: './src/wasm-lib'

- run: yarn build:wasm:dev

- run: yarn build

- run: yarn test
Expand Down
145 changes: 143 additions & 2 deletions src/wasm-lib/Cargo.lock

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

33 changes: 33 additions & 0 deletions src/wasm-lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,25 @@ crate-type = ["cdylib", "rlib"]
default = ["console_error_panic_hook"]

[dependencies]
atty = "0.2.14"
anyhow = { version = "1", features = ["backtrace"] }
colored = "2.1.0"
colored_json = "4.1"
dirs = "5"
kcl-lib = { git = "https://github.com/kittycad/modeling-app", branch = "main" }
kittycad = { version = "0.3.0", default-features = false, features = ["js", "requests"] }
heck = "0.5.0"
parse-display = "0.9.0"
regex = "1"
reqwest = { version = "0.11", default-features = false, features = ["json", "rustls-tls"] }
serde = { version = "1", features = ["derive"] }
shlex = "1.3.0"
thiserror = "1"
toml = "0.8.12"
toml_edit = "0.21.0"
unicode-segmentation = "1.11.0"
url = "2.5.0"
uuid = { version = "1.7", features = ["serde", "v4"] }
wasm-bindgen = "0.2.84"

# The `console_error_panic_hook` crate provides better debugging of panics by
Expand All @@ -25,6 +42,22 @@ console_error_panic_hook = { version = "0.1.7", optional = true }
[dev-dependencies]
wasm-bindgen-test = "0.3.34"

# [target.'cfg(target_arch = "wasm32")'.dependencies]
# futures = "0.3.29"
# js-sys = "0.3.65"
# tower-lsp = { version = "0.20.0", default-features = false, features = ["runtime-agnostic"] }
# wasm-bindgen-futures = { version = "0.4.37", features = ["futures-core-03-stream"] }
# wasm-streams = "0.4.0"

# [target.'cfg(target_arch = "wasm32")'.dependencies.web-sys]
# version = "0.3.65"
# features = [
# "console",
# "HtmlTextAreaElement",
# "ReadableStream",
# "WritableStream",
# ]

[profile.release]
# Tell `rustc` to optimize for small code size.
opt-level = "s"
Loading

0 comments on commit f4fb557

Please sign in to comment.