Skip to content

Commit d3d3dec

Browse files
Prepare for upcoming Component Model adoption in js gem
* Rename the current bindgen directory to bindgen/legacy * Merge witapi extension into js extension because they will be a single dso after the Component Model adoption.
1 parent 568d169 commit d3d3dec

File tree

15 files changed

+12
-27
lines changed

15 files changed

+12
-27
lines changed

packages/gems/js/ext/js/depend

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
link.filelist:
22
echo $(foreach obj,$(OBJS),$(abspath $(obj))) > $@
3+
echo -mexec-model=reactor >> $@
34

45
js.a: link.filelist
56

6-
js-core.o: $(srcdir)/bindgen/rb-js-abi-host.h
7+
js-core.o: $(srcdir)/bindgen/legacy/rb-js-abi-host.h
78

8-
bindgen/%.o: $(srcdir)/bindgen/%.c
9+
bindgen/legacy/%.o: $(srcdir)/bindgen/legacy/%.c
910
@mkdir -p "$(@D)"
10-
$(CC) -c -I$(srcdir)/bindgen -o $@ $<
11+
$(CC) -c -I$(srcdir)/bindgen/legacy -o $@ $<

packages/gems/js/ext/js/extconf.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
require "mkmf"
2-
$objs = %w[js-core.o bindgen/rb-js-abi-host.o]
2+
$objs = %w[js-core.o witapi-core.o bindgen/legacy/rb-js-abi-host.o bindgen/legacy/rb-abi-guest.o]
33
create_makefile("js")

packages/gems/js/ext/js/js-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include "ruby.h"
44

5-
#include "bindgen/rb-js-abi-host.h"
5+
#include "bindgen/legacy/rb-js-abi-host.h"
66

77
// MARK: - Ruby extension
88

packages/gems/js/ext/witapi/witapi-core.c renamed to packages/gems/js/ext/js/witapi-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ static VALUE rb_eval_string_value_protect(VALUE str, int *pstate) {
1717

1818
#define TAG_NONE 0
1919

20-
#include "bindgen/rb-abi-guest.h"
20+
#include "bindgen/legacy/rb-abi-guest.h"
2121

2222
__attribute__((import_module("asyncify"), import_name("start_unwind"))) void
2323
asyncify_start_unwind(void *buf);

0 commit comments

Comments
 (0)