Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Biluo Shen
Neos
Commits
6ed7c91d
Commit
6ed7c91d
authored
Apr 09, 2023
by
timel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: build steps 50%
parent
a9842169
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
76 additions
and
62 deletions
+76
-62
.eslintrc.json
.eslintrc.json
+17
-17
.gitlab-ci.yml
.gitlab-ci.yml
+25
-22
rust-src/Cargo.toml
rust-src/Cargo.toml
+7
-0
src/env.d.ts
src/env.d.ts
+22
-22
tsconfig.json
tsconfig.json
+4
-0
vite.config.ts
vite.config.ts
+1
-1
No files found.
.eslintrc.json
View file @
6ed7c91d
...
...
@@ -19,23 +19,23 @@
"settings"
:
{
"import/resolver"
:
{
"node"
:
true
,
"typescript"
:
true
,
"alias"
:
{
"map"
:
[
[
"rust-src"
,
"/rust-src/pkg"
]
],
"extensions"
:
[
".js"
,
".jsx"
,
".ts"
,
".tsx"
,
".json"
,
".wasm"
]
}
"typescript"
:
true
//
"alias"
:
{
//
"map"
:
[
//
[
//
"rust-src"
,
//
"/rust-src/pkg"
//
]
//
],
//
"extensions"
:
[
//
".js"
,
//
".jsx"
,
//
".ts"
,
//
".tsx"
,
//
".json"
,
//
".wasm"
//
]
//
}
}
}
}
.gitlab-ci.yml
View file @
6ed7c91d
stages
:
-
install
-
check
-
lint
-
test
-
rs_check_lint
-
wasm
-
ts_check_lint
-
test
-
build
-
deploy
...
...
@@ -22,31 +22,15 @@ npm_ci:
dependencies
:
-
npm_ci
ts_check
:
dependencies
:
-
npm_ci
stage
:
check
tags
:
-
linux
script
:
-
npx tsc
rs_check
:
stage
:
check
stage
:
rs_check_lint
image
:
rust:latest
tags
:
-
linux
script
:
cd rust-src && cargo check
ts_lint
:
extends
:
.build_base
stage
:
lint
tags
:
-
linux
script
:
npm run lint
rs_lint
:
stage
:
lint
stage
:
rs_check_
lint
image
:
rust:latest
tags
:
-
linux
...
...
@@ -70,6 +54,25 @@ wasm_build:
-
rust-src/pkg
-
node_modules
ts_check
:
dependencies
:
-
npm_ci
-
wasm_build
stage
:
ts_check_lint
tags
:
-
linux
script
:
-
npx tsc
ts_lint
:
dependencies
:
-
wasm_build
extends
:
.build_base
stage
:
ts_check_lint
tags
:
-
linux
script
:
npm run lint
npm_build
:
dependencies
:
-
wasm_build
...
...
@@ -90,7 +93,7 @@ deploy:
-
linux
only
:
-
main
dependencies
:
dependencies
:
-
npm_build
script
:
-
mv neos-assets dist/
...
...
rust-src/Cargo.toml
View file @
6ed7c91d
...
...
@@ -23,3 +23,10 @@ wasm-bindgen-test = "0.3.13"
[profile.release]
opt-level
=
"s"
[source.crates-io]
registry
=
"https://github.com/rust-lang/crates.io-index"
replace-with
=
'ustc'
[source.ustc]
registry
=
"git://mirrors.ustc.edu.cn/crates.io-index"
src/env.d.ts
View file @
6ed7c91d
...
...
@@ -14,25 +14,25 @@ interface ImportMeta {
/**
* 手动声明WASM模块rust-src
*/
declare
module
"
rust-src
"
{
export
default
function
rustInit
(
url
?:
URL
):
Promise
<
void
>
;
export
class
BufferWriter
{
constructor
();
public
writeInt8
(
value
:
number
):
void
;
public
writeUint8
(
value
:
number
):
void
;
public
writeInt16
(
value
:
number
):
void
;
public
writeUint16
(
value
:
number
):
void
;
public
writeInt32
(
value
:
number
):
void
;
public
writeUint32
(
value
:
number
):
void
;
public
toArray
():
Uint8Array
;
}
export
class
BufferReader
{
constructor
(
buffer
:
Uint8Array
);
public
readInt8
():
number
;
public
readUint8
():
number
;
public
readInt16
():
number
;
public
readUint16
():
number
;
public
readInt32
():
number
;
public
readUint32
():
number
;
}
}
//
declare module "rust-src" {
//
export default function rustInit(url?: URL): Promise<void>;
//
export class BufferWriter {
//
constructor();
//
public writeInt8(value: number): void;
//
public writeUint8(value: number): void;
//
public writeInt16(value: number): void;
//
public writeUint16(value: number): void;
//
public writeInt32(value: number): void;
//
public writeUint32(value: number): void;
//
public toArray(): Uint8Array;
//
}
//
export class BufferReader {
//
constructor(buffer: Uint8Array);
//
public readInt8(): number;
//
public readUint8(): number;
//
public readInt16(): number;
//
public readUint16(): number;
//
public readInt32(): number;
//
public readUint32(): number;
//
}
//
}
tsconfig.json
View file @
6ed7c91d
...
...
@@ -26,9 +26,13 @@
"@/*"
:
[
"./src/*"
],
"rust-src"
:
[
"./rust-src/pkg"
]
}
},
"include"
:
[
"src"
,
"rust-src/pkg"
]
}
vite.config.ts
View file @
6ed7c91d
...
...
@@ -13,7 +13,7 @@ export default defineConfig({
plugins
:
[
react
(),
svgr
(),
wasmPack
(
"
./rust-src
"
),
//
wasmPack("./rust-src"),
ydkLoader
(),
tsconfigPaths
(),
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment