wasmify-rails 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b2a978cc93a769fd29e2cfa52a5c4c8aef4d6747ef05255fdd0b6be54618a98
4
- data.tar.gz: 402d4df38fb308c5645dbd2b7379733bf6fe633c6d06cb0faa1504a85dc13cf5
3
+ metadata.gz: a391ad32c5709fedb1427c1802781700d9f71a7c9b18633369440246a89ade7e
4
+ data.tar.gz: db08da5b58547b4ec76874fdec3adecea88c99178f6aa863fc2e95c5e2f14942
5
5
  SHA512:
6
- metadata.gz: e02c1a8081d57ea23f0efa5b6fe486cb0db7efab55bb3611337409703090cbbdb8f5cca667333de2874707d3d1eedfee524aa05cf8d59b83b5712439b85bd52b
7
- data.tar.gz: 8a55254d6f625d54ac9757d94cfda2466d66bf8457d75f88cd8e0297e354caf4e27d60e4d94c51d761b40a79b4766098b13b65d2dd0833f5cc643f14647ab349
6
+ metadata.gz: 7b823f898970c450844294c43bcbb2776c0ce6c0ec1953213a798cf203d3f42b61d503a768a1f74a0173a9f4a7c72346612ace29a7caea39020c52ad9cc133e6
7
+ data.tar.gz: 4c3b55592d56940b857a9b6424dbefa859435630a53f9ef05b6e71351e96788084ced7b4cdddc801d4fc8c8fd3893c91e2e339b362f59af33a4c23e39eecc71f
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 0.2.3
6
+
7
+ - Add `skipInitialize` option to `initVM`.
8
+
9
+ - Only skip extensions building for excluded gems.
10
+
5
11
  ## 0.2.2
6
12
 
7
13
  - Fix handling multipart uploads in Data URI middleware.
@@ -1,3 +1,5 @@
1
+ import path from "path";
2
+
1
3
  import { defineConfig } from "vite";
2
4
  import { VitePWA } from "vite-plugin-pwa";
3
5
 
@@ -14,8 +16,8 @@ export default defineConfig({
14
16
  build: {
15
17
  rollupOptions: {
16
18
  input: {
17
- main: resolve(__dirname, 'index.html'),
18
- boot: resolve(__dirname, 'boot.html'),
19
+ main: path.resolve(__dirname, 'index.html'),
20
+ boot: path.resolve(__dirname, 'boot.html'),
19
21
  },
20
22
  },
21
23
  },
@@ -9,8 +9,6 @@ module Wasmify
9
9
  module Rails
10
10
  # A wrapper for rbwasm build command
11
11
  class Builder
12
- ORIGINAL_EXCLUDED_GEMS = RubyWasm::Packager::EXCLUDED_GEMS.dup.freeze
13
-
14
12
  attr_reader :output_dir, :target
15
13
 
16
14
  def initialize(output_dir: Wasmify::Rails.config.tmp_dir, target: Wasmify::Rails.config.wasm_target)
@@ -19,19 +17,26 @@ module Wasmify
19
17
  end
20
18
 
21
19
  def run(name:, exclude_gems: [], opts: "")
22
- # Reset excluded gems
23
- RubyWasm::Packager::EXCLUDED_GEMS.replace(ORIGINAL_EXCLUDED_GEMS)
20
+ $exclude_exts = []
24
21
 
25
22
  # Add configured excluded gems
26
23
  Wasmify::Rails.config.exclude_gems.each do |gem_name|
27
- RubyWasm::Packager::EXCLUDED_GEMS << gem_name
24
+ $exclude_exts << gem_name
28
25
  end
29
26
 
30
27
  # Add additional excluded gems
31
28
  exclude_gems.each do |gem_name|
32
- RubyWasm::Packager::EXCLUDED_GEMS << gem_name
29
+ $exclude_exts << gem_name
33
30
  end
34
31
 
32
+ RubyWasm::Packager::Core::BuildStrategy.prepend(Module.new do
33
+ def specs_with_extensions
34
+ super.reject do |spec|
35
+ $exclude_exts.include?(spec.first.name)
36
+ end
37
+ end
38
+ end)
39
+
35
40
  opts = opts&.split(" ") || []
36
41
 
37
42
  args = %W(
@@ -20,7 +20,7 @@ module Wasmify
20
20
 
21
21
  def run(ruby_wasm_path:, name:, directories: Wasmify::Rails.config.pack_directories, storage_dir: nil)
22
22
  unless system("which wasi-vfs > /dev/null 2>&1")
23
- raise "wasi-vfs is required to pack the application.\n"
23
+ raise "wasi-vfs is required to pack the application.\n" +
24
24
  "Please see installations instructions at: https://github.com/kateinoigakukun/wasi-vfs"
25
25
  end
26
26
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Wasmify
4
4
  module Rails # :nodoc:
5
- VERSION = "0.2.2"
5
+ VERSION = "0.2.3"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wasmify-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir Dementyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-15 00:00:00.000000000 Z
11
+ date: 2025-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties