Skip to content

Commit 88eef76

Browse files
Don't include Component-format Ruby in npm packages
The Component-format Ruby is not yet ready for JS-host environments, and is decoupled by `jco transpile` during the build process. Thus, users generally don't need the Component-format binary, and just use the transpiled version. Removing the binary reduces the package size and it fits within jsdelivr size limits.
1 parent cbde0a1 commit 88eef76

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rakelib/packaging.rake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ namespace :npm do
7676
"-o",
7777
File.join(dist_dir, "ruby.debug+stdlib.wasm")
7878
if pkg[:enable_component_model]
79-
component_path = File.join(dist_dir, "ruby.component.wasm")
79+
component_path = File.join(pkg_dir, "tmp", "ruby.component.wasm")
80+
FileUtils.mkdir_p(File.dirname(component_path))
81+
8082
sh env.merge("RUBY_WASM_EXPERIMENTAL_COMPONENT_MODEL" => "1"),
8183
*build_command, "-o", component_path
8284
sh "npx", "jco", "transpile",

0 commit comments

Comments
 (0)