Skip to content

Commit 383dd52

Browse files
committed
stamp: so many changes
1 parent 41f0103 commit 383dd52

File tree

592 files changed

+25504
-13144
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

592 files changed

+25504
-13144
lines changed

.devcontainer/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ COPY scripts/install_onnx.sh /tmp/install_onnx.sh
1111

1212
WORKDIR /tmp
1313

14-
ENV DENO_INSTALL=/deno
14+
ENV DENO_INSTALL=/usr/local
15+
ENV DPRINT_INSTALL=/usr/local
1516

1617
RUN /tmp/install.sh $TARGETPLATFORM

.devcontainer/devcontainer.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
"dockerfile": "Dockerfile",
55
"context": ".."
66
},
7-
"containerEnv": {
8-
"PATH": "${localEnv:PATH}:/deno/bin"
9-
},
107
"features": {
118
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
129
"ghcr.io/jungaretti/features/make:1": {}
@@ -33,7 +30,8 @@
3330
"ms-azuretools.vscode-docker",
3431
"ms-vscode.hexeditor",
3532
"vadimcn.vscode-lldb",
36-
"denoland.vscode-deno"
33+
"denoland.vscode-deno",
34+
"dprint.dprint"
3735
]
3836
}
3937
}

.devcontainer/install.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ mv /tmp/onnxruntime/lib/libonnxruntime.so* /usr/lib
1313
curl -fsSL https://ollama.com/install.sh | sh
1414

1515
# Deno
16-
mkdir -p /deno
1716
curl -fsSL https://deno.land/install.sh | bash -s -- v$DENO_VERSION
18-
chown -R vscode /deno
17+
18+
# dprint
19+
curl -fsSL https://dprint.dev/install.sh | sh

.dprint.json

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"typescript": {
3+
"deno": true
4+
},
5+
"markdown": {
6+
"deno": true
7+
},
8+
"json": {
9+
"deno": true
10+
},
11+
"yaml": {
12+
"quotes": "preferSingle"
13+
},
14+
"exec": {
15+
"commands": [{
16+
"command": "rustfmt --config imports_granularity=item",
17+
"exts": ["rs"]
18+
}]
19+
},
20+
"excludes": [
21+
".git",
22+
"target",
23+
"crates/base/test_cases/invalid_imports",
24+
"crates/base/test_cases/ai-ort-rust-backend/**/__snapshot__"
25+
],
26+
"plugins": [
27+
"https://plugins.dprint.dev/typescript-0.93.2.wasm",
28+
"https://plugins.dprint.dev/json-0.19.4.wasm",
29+
"https://plugins.dprint.dev/markdown-0.17.8.wasm",
30+
"https://plugins.dprint.dev/toml-0.6.3.wasm",
31+
"https://plugins.dprint.dev/exec-0.5.0.json@8d9972eee71fa1590e04873540421f3eda7674d0f1aae3d7c788615e7b7413d0",
32+
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.0.wasm"
33+
]
34+
}

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
indent_style = space
7+
indent_size = 2
8+
charset = utf-8
9+
trim_trailing_whitespace = true

.github/workflows/ci.yml

+9-8
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,21 @@ env:
1313
CARGO_TERM_COLOR: always
1414
RUSTUP_MAX_RETRIES: 10
1515
ORT_DYLIB_PATH: /tmp/onnxruntime/lib/libonnxruntime.so
16-
RUST_LOG: sb_event_worker=trace
16+
RUST_LOG: ext_event_worker=trace
1717

1818
jobs:
1919
cargo-fmt:
20-
name: "cargo fmt"
20+
name: 'fmt'
2121
runs-on: ubuntu-latest
2222
steps:
2323
- uses: actions/checkout@v4
24-
- run: rustup show
25-
- run: ./scripts/fmt.sh
24+
- uses: denoland/setup-deno@v2
25+
with:
26+
deno-version: v2.x
27+
- run: deno run --allow-write --allow-read --allow-run --allow-net ./scripts/format.js --check
2628

2729
cargo-clippy:
28-
name: "cargo clippy"
30+
name: 'cargo clippy'
2931
runs-on: ubuntu-latest
3032
steps:
3133
- uses: actions/checkout@v4
@@ -34,7 +36,7 @@ jobs:
3436
- run: ./scripts/clippy.sh
3537

3638
cargo-test:
37-
name: "cargo test"
39+
name: 'cargo test'
3840
runs-on: ubuntu-latest
3941
steps:
4042
- name: Remove unwanted software
@@ -54,7 +56,7 @@ jobs:
5456

5557
- uses: cardinalby/export-env-action@v2
5658
with:
57-
envFile: ".env"
59+
envFile: '.env'
5860

5961
- name: Install ONNX Runtime Library
6062
run: ./scripts/install_onnx.sh ${{ env.ONNXRUNTIME_VERSION }} linux x64 /tmp/onnxruntime
@@ -79,4 +81,3 @@ jobs:
7981
SECRET_ACCESS_KEY: ${{ secrets.SUPABASE_S3_SECRET }}
8082

8183
- run: ./scripts/test.sh --features base/tracing
82-

.github/workflows/release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555

5656
- uses: cardinalby/export-env-action@v2
5757
with:
58-
envFile: ".env"
58+
envFile: '.env'
5959
- id: build
6060
uses: docker/build-push-action@v3
6161
with:
@@ -102,7 +102,7 @@ jobs:
102102
103103
- uses: cardinalby/export-env-action@v2
104104
with:
105-
envFile: ".env"
105+
envFile: '.env'
106106
- id: build
107107
uses: docker/build-push-action@v3
108108
with:

.vscode/launch.template.jsonc

+63-65
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,74 @@
1-
/*
1+
/*
22
33
Copy this file into '.vscode/launch.json' or merge its contents into your existing
44
configurations.
55
66
*/
77

88
{
9-
"configurations": [
10-
{
11-
"name": "Debug Runtime",
12-
"type": "lldb",
13-
"request": "launch",
14-
"cargo": {
15-
"args": [
16-
"build",
17-
"--bin=edge-runtime",
18-
"--features=cli/tracing"
19-
],
20-
"filter": {
21-
"kind": "bin"
22-
}
23-
},
24-
"cwd": "${workspaceFolder}",
25-
"sourceLanguages": [
26-
"rust"
27-
],
28-
"args": [
29-
"-v",
30-
"start",
31-
"--main-service",
32-
"./examples/main",
33-
"--event-worker",
34-
"./examples/event-manager"
35-
36-
// To enable the inspector capability, uncomment the line below.
37-
// "--inspect-brk"
38-
39-
// If you want to listen to the inspect session on a different port, uncomment the
40-
// line below instead.
41-
// "--inspect-brk=127.0.0.1:<PORT>"
9+
"configurations": [
10+
{
11+
"name": "Debug Runtime",
12+
"type": "lldb",
13+
"request": "launch",
14+
"cargo": {
15+
"args": [
16+
"build",
17+
"--bin=edge-runtime",
18+
"--features=cli/tracing"
19+
],
20+
"filter": {
21+
"kind": "bin"
22+
}
23+
},
24+
"cwd": "${workspaceFolder}",
25+
"sourceLanguages": [
26+
"rust"
27+
],
28+
"args": [
29+
"-v",
30+
"start",
31+
"--main-service",
32+
"./examples/main",
33+
"--event-worker",
34+
"./examples/event-manager"
35+
// To enable the inspector capability, uncomment the line below.
36+
// "--inspect-brk"
4237

43-
// If you want to allow an inspector session to be created on the main worker,
44-
// uncomment the line below.
45-
//
46-
// This flag must be used in combination with the flag above.
47-
// "--inspect-main"
48-
],
49-
"env": {
50-
"RUST_BACKTRACE": "full",
51-
"EDGE_RUNTIME_PORT": "9998"
38+
// If you want to listen to the inspect session on a different port, uncomment the
39+
// line below instead.
40+
// "--inspect-brk=127.0.0.1:<PORT>"
5241

53-
// If you want to get a detailed log, uncomment below.
54-
// Value of environment variable below is described in detail in the links below:
55-
// https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives
56-
// "RUST_LOG": "trace"
57-
}
58-
},
59-
{
60-
"name": "Attach V8 Inspector",
61-
"type": "node",
62-
"address": "127.0.0.1",
63-
"request": "attach",
64-
"localRoot": "/",
65-
"remoteRoot": "/",
66-
"timeout": 1000000,
42+
// If you want to allow an inspector session to be created on the main worker,
43+
// uncomment the line below.
44+
//
45+
// This flag must be used in combination with the flag above.
46+
// "--inspect-main"
47+
],
48+
"env": {
49+
"RUST_BACKTRACE": "full",
50+
"EDGE_RUNTIME_PORT": "9998"
51+
// If you want to get a detailed log, uncomment below.
52+
// Value of environment variable below is described in detail in the links below:
53+
// https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives
54+
// "RUST_LOG": "trace"
55+
}
56+
},
57+
{
58+
"name": "Attach V8 Inspector",
59+
"type": "node",
60+
"address": "127.0.0.1",
61+
"request": "attach",
62+
"localRoot": "/",
63+
"remoteRoot": "/",
64+
"timeout": 1000000,
6765

68-
// Properties below are optional.
69-
"restart": true,
66+
// Properties below are optional.
67+
"restart": true,
7068

71-
// Inspector is accepting sessions on 9229 by default. If you changed the listening port
72-
// via the inspector flag above, this value must also be changed.
73-
"port": 9229
74-
}
75-
]
76-
}
69+
// Inspector is accepting sessions on 9229 by default. If you changed the listening port
70+
// via the inspector flag above, this value must also be changed.
71+
"port": 9229
72+
}
73+
]
74+
}

.vscode/settings.template.jsonc

+20-14
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
1-
/*
1+
/*
22
33
Copy this file into '.vscode/settings.json' or merge its contents into your existing
44
configurations.
55
66
*/
77

88
{
9-
"lldb.launch.preRunCommands": [
10-
"script lldb.debugger.HandleCommand('settings set target.source-map /rustc/{} \"{}/lib/rustlib/src/rust\"'.format(os.popen('rustc --version --verbose').read().split('commit-hash: ')[1].split('\\n')[0].strip(), os.popen('rustc --print sysroot').readline().strip()))"
11-
],
12-
"rust-analyzer.cargo.features": [
13-
"cli/tracing"
14-
],
15-
"rust-analyzer.diagnostics.disabled": [
16-
"E0308"
17-
],
18-
"editor.rulers": [
19-
80
20-
]
21-
}
9+
"lldb.launch.preRunCommands": [
10+
"script lldb.debugger.HandleCommand('settings set target.source-map /rustc/{} \"{}/lib/rustlib/src/rust\"'.format(os.popen('rustc --version --verbose').read().split('commit-hash: ')[1].split('\\n')[0].strip(), os.popen('rustc --print sysroot').readline().strip()))"
11+
],
12+
"rust-analyzer.cargo.features": [
13+
"cli/tracing"
14+
],
15+
"rust-analyzer.diagnostics.disabled": [
16+
"E0308"
17+
],
18+
"editor.rulers": [
19+
80
20+
],
21+
"editor.defaultFormatter": "dprint.dprint",
22+
"editor.formatOnSave": true,
23+
"[javascript][javascriptreact][typescript][typescriptreact]": {
24+
"editor.defaultFormatter": "dprint.dprint",
25+
"editor.formatOnSave": true
26+
}
27+
}

0 commit comments

Comments
 (0)