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

マルチモジュール化: wasmモジュールの作成 #181

Conversation

YuukiToriyama
Copy link
Owner

@YuukiToriyama YuukiToriyama commented Feb 28, 2024

変更点

  • wasmモジュールを作成
  • core/lib.rsに定義していたParserwasm/lib.rsに移動させた

備考

  • マルチモジュール化 #178
  • wasm-pack buildによって生成されるパッケージの名称が@toriyama/japanese-address-parserから@toriyama/wasmに変わっているが、こちらは後続のPRで対応予定

@YuukiToriyama YuukiToriyama changed the title マルチモジュール化: wasmモジュールの作成 マルチモジュール化: wasmモジュールの作成 Feb 28, 2024
#[wasm_bindgen]
impl Parser {
#[wasm_bindgen(constructor)]
pub fn new() -> Self {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [clippy] reported by reviewdog 🐶

warning: you should consider adding a `Default` implementation for `Parser`
  --> wasm/src/lib.rs:12:5
   |
12 | /     pub fn new() -> Self {
13 | |         Parser {}
14 | |     }
   | |_____^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
   = note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
   |
10 + impl Default for Parser {
11 +     fn default() -> Self {
12 +         Self::new()
13 +     }
14 + }
   |

@YuukiToriyama YuukiToriyama self-assigned this Feb 28, 2024
@YuukiToriyama YuukiToriyama marked this pull request as ready for review February 28, 2024 15:06
@YuukiToriyama YuukiToriyama deleted the feature/cargo-workspace/wasm-module branch March 6, 2024 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant