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

finalize JS version #3

Merged
merged 1 commit into from
Nov 29, 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
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