Skip to content

Commit d79152f

Browse files
author
Sean Henry
committed
Finalizes release
1 parent eb55235 commit d79152f

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
"packages/react-native-webgpu-tests",
1010
"examples/Example"
1111
],
12+
"scripts": {
13+
"test:package": "cd packages/react-native-webgpu-tests; yarn run:package",
14+
"test:examples": "cd packages/react-native-webgpu-tests; yarn run:examples"
15+
},
1216
"resolutions": {
1317
"react": "19.0.0",
1418
"react-native": "0.78.0",

packages/react-native-webgpu-experimental/cxx/android/SocketCallback.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ using namespace facebook::jsi;
1414

1515
Value wgpu::socketCallback(Runtime &runtime) {
1616
return WGPU_FUNC_FROM_HOST_FUNC(socketCallback, 1, []) {
17-
auto exampleName = arguments[0].asString(runtime).utf8(runtime);
18-
auto thread = std::thread([exampleName] {
17+
auto message = arguments[0].asString(runtime).utf8(runtime);
18+
auto thread = std::thread([message] {
1919
int sockfd;
2020
struct sockaddr_in server_addr;
2121

@@ -40,7 +40,7 @@ Value wgpu::socketCallback(Runtime &runtime) {
4040
return;
4141
}
4242

43-
if (send(sockfd, exampleName.c_str(), exampleName.length(), 0) < 0) {
43+
if (send(sockfd, message.c_str(), message.length(), 0) < 0) {
4444
WGPU_LOG_ERROR("Failed to send data");
4545
close(sockfd);
4646
return;

packages/react-native-webgpu-experimental/cxx/ios/SocketCallback.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111

1212
Value socketCallback(Runtime &runtime) {
1313
return WGPU_FUNC_FROM_HOST_FUNC(socketCallback, 1, []) {
14-
auto exampleName = arguments[0].asString(runtime).utf8(runtime);
14+
auto message = arguments[0].asString(runtime).utf8(runtime);
1515
static dispatch_queue_t queue;
1616
static dispatch_once_t onceToken;
1717
dispatch_once(&onceToken, ^{
1818
queue = dispatch_queue_create("com.example.socketCallback", DISPATCH_QUEUE_SERIAL);
1919
});
2020
dispatch_async(queue, ^{
2121
CFWriteStreamRef writeStream;
22-
CFDataRef messageData = CFDataCreate(NULL, (UInt8 *)exampleName.c_str(), exampleName.size());
22+
CFDataRef messageData = CFDataCreate(NULL, (UInt8 *)message.c_str(), message.size());
2323
CFStringRef hostString = CFStringCreateWithCString(NULL, HOST, kCFStringEncodingUTF8);
2424
CFHostRef host = CFHostCreateWithName(NULL, hostString);
2525
CFStreamCreatePairWithSocketToCFHost(NULL, host, PORT, NULL, &writeStream);

packages/react-native-webgpu-experimental/types/globals.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ declare global {
22
var reactNativeWebGPUExperimental: {
33
inflate(arrayBuffer: ArrayBuffer): ArrayBuffer;
44
makeVideoPlayer(url: string): VideoPlayer;
5-
socketCallback(exampleName: string): void;
5+
socketCallback(message: string): void;
66
};
77

88
var reactNativeWebGPUThreads: {

packages/react-native-webgpu/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,4 +346,4 @@ The library is built and tested against 0.75 and 0.76. Other versions may work b
346346
|---------------------|--------------|--------|-----|------------------|------------------|
347347
| 0.1.1 | 0.75-0.76 |||||
348348
| 0.1.2 | 0.76-0.78 |||||
349-
349+
| 0.1.3 | 0.77-0.78 |||||

0 commit comments

Comments
 (0)