-
Notifications
You must be signed in to change notification settings - Fork 3
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
Build wasm package #133
Build wasm package #133
Conversation
406 tests were run on |
a30e864
to
15ccc7e
Compare
pub fn env_validate(ci_info: env::parser::CIInfo) -> env::validator::EnvValidation { | ||
env::validator::validate(&ci_info) | ||
pub fn env_validate(ci_info: &env::parser::CIInfo) -> env::validator::EnvValidation { | ||
env::validator::validate(ci_info) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out that only references work as arguments for wasm-exported functions
#[cfg(feature = "wasm")] | ||
#[wasm_bindgen] | ||
impl BundleRepo { | ||
#[wasm_bindgen(constructor)] | ||
pub fn js_new( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These constructors are needed to use new
in JS
45a8100
to
e8e601d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
- name: Setup and build wasm | ||
uses: ./.github/actions/setup_build_wasm | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sanity check: is the intention here to build the wasm targets and then run eslint on them in CI? Is there a specific pattern/issue that this is designed to catch (other than just making sure they build as part of a PR workflow)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm running lints that take into account types on the test code. The test code relies on types from the wasm build, so I have to build the wasm package prior to linting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🏆
depends on #135