Skip to content

Commit

Permalink
finalize JS version
Browse files Browse the repository at this point in the history
  • Loading branch information
nudded committed Nov 29, 2024
1 parent 13dd41b commit 4fc19c5
Show file tree
Hide file tree
Showing 6 changed files with 236 additions and 203 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/javascript.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish NPM package

on:
release:
types: [released]
workflow_dispatch:
inputs:
version:
description: Version
required: true
env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./expression-js
steps:
- uses: actions/checkout@v4
- name: Install
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Build
run: npm run build
- name: Package
run: wasm-pack pack
8 changes: 8 additions & 0 deletions expression-js/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "expression-js"
version = "0.1.0"
edition = "2021"


[lib]
crate-type = ["cdylib"]

Expand All @@ -13,3 +14,10 @@ expression-core = { path = '../expression-core' }
js-sys = "0.3.72"
wasm-bindgen = "0.2.95"
web-sys = { version = "0.3.72", features = ["console"] }

[profile.release]
lto = true
opt-level = 's'

[package.metadata.wasm-pack.profile.release]
wasm-opt = false
Loading

0 comments on commit 4fc19c5

Please sign in to comment.