Skip to content

Commit

Permalink
Wire up some more
Browse files Browse the repository at this point in the history
  • Loading branch information
oleavr committed Oct 1, 2024
1 parent 58958b3 commit 53eb285
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 251 deletions.
9 changes: 9 additions & 0 deletions apps/tracer/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/tracer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
},
"dependencies": {
"@blueprintjs/core": "^5.12.0",
"@frida/react-use-r2": "^1.0.1",
"@monaco-editor/react": "^4.6.0",
"monaco-editor": "^0.51.0",
"react": "^18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion apps/tracer/src/DisassemblyView.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import "./DisassemblyView.css";
import { Handler, HandlerId } from "./model.js";
import { useR2 } from "./use-r2.js";
import { useR2 } from "@frida/react-use-r2";
import { hideContextMenu, Menu, MenuItem, showContextMenu, Spinner } from "@blueprintjs/core";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";

Expand Down
9 changes: 4 additions & 5 deletions apps/tracer/src/model.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { useR2 } from "./use-r2.js";
import { useR2, type Platform, type Architecture } from "@frida/react-use-r2";
import r2WasmUrl from "@frida/react-use-r2/dist/r2.wasm?url";
import { OverlayToaster } from "@blueprintjs/core";
import { useCallback, useEffect, useRef, useState } from "react";
import useWebSocket, { ReadyState } from "react-use-websocket";

console.log("r2WasmUrl:", r2WasmUrl);

const SOCKET_URL = (import.meta.env.MODE === "development")
? "ws://localhost:1337"
: `ws://${window.location.host}`;
Expand Down Expand Up @@ -344,10 +347,6 @@ export interface ProcessDetails {
main_module: NativeModule;
}

export type Platform = "windows" | "darwin" | "linux" | "freebsd" | "qnx";

export type Architecture = "ia32" | "x64" | "arm" | "arm64" | "mips";

export interface NativeModule {
base: string;
name: string;
Expand Down
52 changes: 0 additions & 52 deletions apps/tracer/src/r2.d.ts

This file was deleted.

16 changes: 0 additions & 16 deletions apps/tracer/src/r2.js

This file was deleted.

169 changes: 0 additions & 169 deletions apps/tracer/src/use-r2.ts

This file was deleted.

8 changes: 0 additions & 8 deletions apps/tracer/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,4 @@ export default defineConfig({
}
}
},
server: {
proxy: {
"^/src/r2\\.wasm": {
target: "http://localhost:8000",
rewrite: (path) => path.replace(/^\/src/, ""),
},
}
},
});

0 comments on commit 53eb285

Please sign in to comment.