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
love_飞影
Neos
Commits
00261951
Commit
00261951
authored
Mar 15, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat/rust/buffer' into 'main'
Feat/rust/buffer See merge request
!135
parents
dc12d558
3b0de3ec
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
149 additions
and
78 deletions
+149
-78
rust-src/src/adapters/damage.rs
rust-src/src/adapters/damage.rs
+30
-0
rust-src/src/adapters/mod.rs
rust-src/src/adapters/mod.rs
+7
-0
rust-src/src/buffer.rs
rust-src/src/buffer.rs
+74
-1
rust-src/src/lib.rs
rust-src/src/lib.rs
+3
-31
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/draw.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/draw.ts
+3
-4
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/hint.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/hint.ts
+3
-4
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/newPhase.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/newPhase.ts
+3
-4
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/newTurn.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/newTurn.ts
+3
-4
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/recover.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/recover.ts
+3
-2
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectOption.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectOption.ts
+3
-2
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectPlace.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectPlace.ts
+3
-2
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectPosition.ts
...api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectPosition.ts
+3
-2
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/win.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/win.ts
+3
-2
src/api/ocgcore/ocgAdapter/stoc/stocTimeLimit.ts
src/api/ocgcore/ocgAdapter/stoc/stocTimeLimit.ts
+3
-2
src/ui/Duel/main.tsx
src/ui/Duel/main.tsx
+0
-16
src/ui/WaitRoom.tsx
src/ui/WaitRoom.tsx
+5
-2
No files found.
rust-src/src/adapters/damage.rs
0 → 100644
View file @
00261951
use
std
::
convert
::
TryInto
;
use
wasm_bindgen
::
prelude
::
wasm_bindgen
;
#[wasm_bindgen]
pub
struct
MsgUpdateHp
{
pub
player
:
Option
<
u8
>
,
pub
type_
:
Option
<
u8
>
,
pub
value
:
Option
<
i32
>
,
}
#[repr(u8)]
enum
ActionType
{
_
Unknown
=
0
,
Damage
=
1
,
_
Recover
=
2
,
}
#[wasm_bindgen]
pub
fn
ocgDamageAdapter
(
data
:
js_sys
::
Uint8Array
)
->
MsgUpdateHp
{
let
data
=
data
.to_vec
();
let
player
=
data
[
0
];
let
value
=
data
[
1
..
5
]
.try_into
()
.map
(
i32
::
from_le_bytes
)
.ok
();
MsgUpdateHp
{
player
:
Some
(
player
),
type_
:
Some
(
ActionType
::
Damage
as
u8
),
value
,
}
}
rust-src/src/adapters/mod.rs
0 → 100644
View file @
00261951
//! 一些`ocg raw buffer`到`neos-protobuf message`的转换逻辑
//!
//! TODO: neos与ygopro交互设计介绍
mod
damage
;
pub
use
damage
::
*
;
rust-src/src/buffer.rs
View file @
00261951
// TODO
//! Raw Buffer 解析工具
//!
//! 在Javascript/Typescript中数字类型只有`numbuer`,
//! 要做二进制数组的解析需要用[`DataView`],比较复杂,且性能不佳。
//! 因此这里用WASM实现两个基础的二进制数据解析模块[`BufferReader`]和[`BufferWriter`]。
use
wasm_bindgen
::
prelude
::
wasm_bindgen
;
const
OFFSET_UINT8
:
usize
=
1
;
const
OFFSET_INT8
:
usize
=
1
;
const
OFFSET_UINT16
:
usize
=
2
;
const
OFFSET_UINT32
:
usize
=
4
;
const
OFFSET_INT32
:
usize
=
4
;
#[wasm_bindgen]
pub
struct
BufferReader
{
array
:
Vec
<
u8
>
,
offset
:
usize
,
}
#[wasm_bindgen]
impl
BufferReader
{
#[wasm_bindgen(constructor)]
pub
fn
new
(
array
:
js_sys
::
Uint8Array
)
->
Self
{
Self
{
array
:
array
.to_vec
(),
offset
:
0
,
}
}
pub
fn
readUint8
(
&
mut
self
)
->
u8
{
let
ret
=
self
.array
[
self
.offset
];
self
.offset
+=
OFFSET_UINT8
;
ret
}
pub
fn
readInt8
(
&
mut
self
)
->
i8
{
let
ret
=
self
.array
[
self
.offset
]
as
i8
;
self
.offset
+=
OFFSET_INT8
;
ret
}
pub
fn
readUint16
(
&
mut
self
)
->
u16
{
let
ret
=
self
.array
[
self
.offset
..
self
.offset
+
OFFSET_UINT16
]
.try_into
()
.map
(
u16
::
from_le_bytes
)
.unwrap
();
self
.offset
+=
OFFSET_UINT16
;
ret
}
pub
fn
readUint32
(
&
mut
self
)
->
u32
{
let
ret
=
self
.array
[
self
.offset
..
self
.offset
+
OFFSET_UINT32
]
.try_into
()
.map
(
u32
::
from_le_bytes
)
.unwrap
();
self
.offset
+=
OFFSET_UINT32
;
ret
}
pub
fn
readInt32
(
&
mut
self
)
->
i32
{
let
ret
=
self
.array
[
self
.offset
..
self
.offset
+
OFFSET_INT32
]
.try_into
()
.map
(
i32
::
from_le_bytes
)
.unwrap
();
self
.offset
+=
OFFSET_INT32
;
ret
}
}
rust-src/src/lib.rs
View file @
00261951
#![allow(non_snake_case)]
#![allow(non_snake_case)]
mod
adapters
;
mod
buffer
;
mod
buffer
;
mod
utils
;
mod
utils
;
use
std
::
convert
::
TryInto
;
pub
use
adapters
::
*
;
use
wasm_bindgen
::
prelude
::
wasm_bindgen
;
pub
use
buffer
::
BufferReader
;
pub
use
utils
::
set_panic_hook
;
pub
use
utils
::
set_panic_hook
;
// When the `wee_alloc` feature is enabled, use `wee_alloc` as the global
// When the `wee_alloc` feature is enabled, use `wee_alloc` as the global
...
@@ -13,31 +13,3 @@ pub use utils::set_panic_hook;
...
@@ -13,31 +13,3 @@ pub use utils::set_panic_hook;
#[cfg(feature
=
"wee_alloc"
)]
#[cfg(feature
=
"wee_alloc"
)]
#[global_allocator]
#[global_allocator]
static
ALLOC
:
wee_alloc
::
WeeAlloc
=
wee_alloc
::
WeeAlloc
::
INIT
;
static
ALLOC
:
wee_alloc
::
WeeAlloc
=
wee_alloc
::
WeeAlloc
::
INIT
;
#[wasm_bindgen]
pub
struct
MsgUpdateHp
{
pub
player
:
Option
<
u8
>
,
pub
type_
:
Option
<
u8
>
,
pub
value
:
Option
<
i32
>
,
}
#[repr(u8)]
enum
ActionType
{
_
Unknown
=
0
,
Damage
=
1
,
_
Recover
=
2
,
}
#[wasm_bindgen]
pub
fn
ocgDamageAdapter
(
data
:
js_sys
::
Uint8Array
)
->
MsgUpdateHp
{
let
data
=
data
.to_vec
();
let
player
=
data
[
0
];
let
value
=
data
[
1
..
5
]
.try_into
()
.map
(
i32
::
from_le_bytes
)
.ok
();
MsgUpdateHp
{
player
:
Some
(
player
),
type_
:
Some
(
ActionType
::
Damage
as
u8
),
value
,
}
}
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/draw.ts
View file @
00261951
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
BufferReader
}
from
"
../../bufferIO
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
const
LITTLE_ENDIAN
=
true
;
/*
/*
* MSG Draw
* MSG Draw
...
@@ -11,7 +10,7 @@ const LITTLE_ENDIAN = true;
...
@@ -11,7 +10,7 @@ const LITTLE_ENDIAN = true;
* @usage - 玩家抽卡内容
* @usage - 玩家抽卡内容
* */
* */
export
default
(
data
:
Uint8Array
)
=>
{
export
default
(
data
:
Uint8Array
)
=>
{
const
reader
=
new
BufferReader
(
data
,
LITTLE_ENDIAN
);
const
reader
=
new
BufferReader
(
data
);
const
player
=
reader
.
readUint8
();
const
player
=
reader
.
readUint8
();
const
count
=
reader
.
readUint8
();
const
count
=
reader
.
readUint8
();
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/hint.ts
View file @
00261951
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
BufferReader
}
from
"
../../bufferIO
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
const
LITTLE_ENDIAN
=
true
;
/*
/*
* Msg Hint
* Msg Hint
...
@@ -14,7 +13,7 @@ const LITTLE_ENDIAN = true;
...
@@ -14,7 +13,7 @@ const LITTLE_ENDIAN = true;
* */
* */
export
default
(
data
:
Uint8Array
)
=>
{
export
default
(
data
:
Uint8Array
)
=>
{
const
reader
=
new
BufferReader
(
data
,
LITTLE_ENDIAN
);
const
reader
=
new
BufferReader
(
data
);
const
hintCommand
=
reader
.
readUint8
();
const
hintCommand
=
reader
.
readUint8
();
const
hintPlayer
=
reader
.
readUint8
();
const
hintPlayer
=
reader
.
readUint8
();
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/newPhase.ts
View file @
00261951
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
BufferReader
}
from
"
../../bufferIO
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
const
LITTLE_ENDIAN
=
true
;
/*
/*
* Msg New Phase
* Msg New Phase
...
@@ -12,7 +11,7 @@ const LITTLE_ENDIAN = true;
...
@@ -12,7 +11,7 @@ const LITTLE_ENDIAN = true;
* */
* */
export
default
(
data
:
Uint8Array
)
=>
{
export
default
(
data
:
Uint8Array
)
=>
{
const
reader
=
new
BufferReader
(
data
,
LITTLE_ENDIAN
);
const
reader
=
new
BufferReader
(
data
);
const
phase
=
reader
.
readUint16
();
const
phase
=
reader
.
readUint16
();
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/newTurn.ts
View file @
00261951
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
BufferReader
}
from
"
../../bufferIO
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
const
LITTLE_ENDIAN
=
true
;
/*
/*
* MSG New Turn
* MSG New Turn
...
@@ -12,7 +11,7 @@ const LITTLE_ENDIAN = true;
...
@@ -12,7 +11,7 @@ const LITTLE_ENDIAN = true;
* */
* */
export
default
(
data
:
Uint8Array
)
=>
{
export
default
(
data
:
Uint8Array
)
=>
{
const
reader
=
new
BufferReader
(
data
,
LITTLE_ENDIAN
);
const
reader
=
new
BufferReader
(
data
);
const
player
=
reader
.
readUint8
();
const
player
=
reader
.
readUint8
();
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/recover.ts
View file @
00261951
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
BufferReader
}
from
"
../../bufferIO
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
/*
/*
* Msg Recover
* Msg Recover
...
@@ -8,7 +9,7 @@ import { BufferReader } from "../../bufferIO";
...
@@ -8,7 +9,7 @@ import { BufferReader } from "../../bufferIO";
* @param value - 回复的Hp数值
* @param value - 回复的Hp数值
* */
* */
export
default
(
data
:
Uint8Array
)
=>
{
export
default
(
data
:
Uint8Array
)
=>
{
const
reader
=
new
BufferReader
(
data
,
true
);
const
reader
=
new
BufferReader
(
data
);
const
player
=
reader
.
readUint8
();
const
player
=
reader
.
readUint8
();
const
value
=
reader
.
readInt32
();
const
value
=
reader
.
readInt32
();
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectOption.ts
View file @
00261951
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
BufferReader
}
from
"
../../bufferIO
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
import
MsgSelectOption
=
ygopro
.
StocGameMessage
.
MsgSelectOption
;
import
MsgSelectOption
=
ygopro
.
StocGameMessage
.
MsgSelectOption
;
/*
/*
...
@@ -11,7 +12,7 @@ import MsgSelectOption = ygopro.StocGameMessage.MsgSelectOption;
...
@@ -11,7 +12,7 @@ import MsgSelectOption = ygopro.StocGameMessage.MsgSelectOption;
* */
* */
export
default
(
data
:
Uint8Array
)
=>
{
export
default
(
data
:
Uint8Array
)
=>
{
const
reader
=
new
BufferReader
(
data
,
true
);
const
reader
=
new
BufferReader
(
data
);
const
player
=
reader
.
readUint8
();
const
player
=
reader
.
readUint8
();
const
count
=
reader
.
readUint8
();
const
count
=
reader
.
readUint8
();
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectPlace.ts
View file @
00261951
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
BufferReader
}
from
"
../../bufferIO
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
import
MsgSelectPlace
=
ygopro
.
StocGameMessage
.
MsgSelectPlace
;
import
MsgSelectPlace
=
ygopro
.
StocGameMessage
.
MsgSelectPlace
;
/*
/*
...
@@ -11,7 +12,7 @@ import MsgSelectPlace = ygopro.StocGameMessage.MsgSelectPlace;
...
@@ -11,7 +12,7 @@ import MsgSelectPlace = ygopro.StocGameMessage.MsgSelectPlace;
* */
* */
export
default
(
data
:
Uint8Array
)
=>
{
export
default
(
data
:
Uint8Array
)
=>
{
const
reader
=
new
BufferReader
(
data
,
true
);
const
reader
=
new
BufferReader
(
data
);
const
player
=
reader
.
readUint8
();
const
player
=
reader
.
readUint8
();
let
count
=
reader
.
readUint8
();
let
count
=
reader
.
readUint8
();
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectPosition.ts
View file @
00261951
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
BufferReader
}
from
"
../../bufferIO
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
import
MsgSelectPosition
=
ygopro
.
StocGameMessage
.
MsgSelectPosition
;
import
MsgSelectPosition
=
ygopro
.
StocGameMessage
.
MsgSelectPosition
;
/*
/*
...
@@ -11,7 +12,7 @@ import MsgSelectPosition = ygopro.StocGameMessage.MsgSelectPosition;
...
@@ -11,7 +12,7 @@ import MsgSelectPosition = ygopro.StocGameMessage.MsgSelectPosition;
* */
* */
export
default
(
data
:
Uint8Array
)
=>
{
export
default
(
data
:
Uint8Array
)
=>
{
const
reader
=
new
BufferReader
(
data
,
true
);
const
reader
=
new
BufferReader
(
data
);
const
player
=
reader
.
readUint8
();
const
player
=
reader
.
readUint8
();
const
code
=
reader
.
readUint32
();
const
code
=
reader
.
readUint32
();
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/win.ts
View file @
00261951
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
BufferReader
}
from
"
../../bufferIO
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
import
MsgWin
=
ygopro
.
StocGameMessage
.
MsgWin
;
import
MsgWin
=
ygopro
.
StocGameMessage
.
MsgWin
;
/*
/*
...
@@ -9,7 +10,7 @@ import MsgWin = ygopro.StocGameMessage.MsgWin;
...
@@ -9,7 +10,7 @@ import MsgWin = ygopro.StocGameMessage.MsgWin;
* @param winType - 结果类型
* @param winType - 结果类型
* */
* */
export
default
(
data
:
Uint8Array
)
=>
{
export
default
(
data
:
Uint8Array
)
=>
{
const
reader
=
new
BufferReader
(
data
,
true
);
const
reader
=
new
BufferReader
(
data
);
const
player
=
reader
.
readUint8
();
const
player
=
reader
.
readUint8
();
const
winType
=
reader
.
readUint8
();
const
winType
=
reader
.
readUint8
();
...
...
src/api/ocgcore/ocgAdapter/stoc/stocTimeLimit.ts
View file @
00261951
import
{
ygopro
}
from
"
../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../idl/ocgcore
"
;
import
{
YgoProPacket
,
StocAdapter
}
from
"
../packet
"
;
import
{
YgoProPacket
,
StocAdapter
}
from
"
../packet
"
;
import
{
BufferReader
}
from
"
../bufferIO
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
/*
/*
* STOC TimeLimit
* STOC TimeLimit
...
@@ -16,7 +17,7 @@ export default class TimeLimit implements StocAdapter {
...
@@ -16,7 +17,7 @@ export default class TimeLimit implements StocAdapter {
}
}
upcast
():
ygopro
.
YgoStocMsg
{
upcast
():
ygopro
.
YgoStocMsg
{
const
reader
=
new
BufferReader
(
this
.
packet
.
exData
,
true
);
const
reader
=
new
BufferReader
(
this
.
packet
.
exData
);
const
player
=
reader
.
readInt8
();
const
player
=
reader
.
readInt8
();
const
leftTime
=
reader
.
readUint16
();
const
leftTime
=
reader
.
readUint16
();
...
...
src/ui/Duel/main.tsx
View file @
00261951
...
@@ -20,7 +20,6 @@ import Phase from "./phase";
...
@@ -20,7 +20,6 @@ import Phase from "./phase";
import
CheckCardModalV2
from
"
./checkCardModalV2
"
;
import
CheckCardModalV2
from
"
./checkCardModalV2
"
;
import
ExtraDeck
from
"
./extraDeck
"
;
import
ExtraDeck
from
"
./extraDeck
"
;
import
NeosLayout
from
"
./layout
"
;
import
NeosLayout
from
"
./layout
"
;
import
{
initStrings
}
from
"
../../api/strings
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
DuelTimeLine
from
"
./timeLine
"
;
import
DuelTimeLine
from
"
./timeLine
"
;
import
{
Row
}
from
"
antd
"
;
import
{
Row
}
from
"
antd
"
;
...
@@ -34,21 +33,6 @@ import {
...
@@ -34,21 +33,6 @@ import {
// Ref: https://github.com/brianzinn/react-babylonjs/issues/126
// Ref: https://github.com/brianzinn/react-babylonjs/issues/126
const
NeosDuel
=
()
=>
{
const
NeosDuel
=
()
=>
{
// 应该用更优雅的方式处理`useEffect`执行两次的问题
const
initialRender
=
useRef
(
true
);
useEffect
(()
=>
{
const
init
=
async
()
=>
{
await
initStrings
();
};
if
(
initialRender
.
current
)
{
initialRender
.
current
=
false
;
return
;
}
init
();
},
[]);
const
meInfo
=
useAppSelector
(
selectMeInitInfo
);
const
meInfo
=
useAppSelector
(
selectMeInitInfo
);
const
opInfo
=
useAppSelector
(
selectOpInitInfo
);
const
opInfo
=
useAppSelector
(
selectOpInitInfo
);
...
...
src/ui/WaitRoom.tsx
View file @
00261951
...
@@ -46,6 +46,7 @@ import NeosConfig from "../../neos.config.json";
...
@@ -46,6 +46,7 @@ import NeosConfig from "../../neos.config.json";
import
YGOProDeck
from
"
ygopro-deck-encode
"
;
import
YGOProDeck
from
"
ygopro-deck-encode
"
;
//@ts-ignore
//@ts-ignore
import
rustInit
from
"
rust-src
"
;
import
rustInit
from
"
rust-src
"
;
import
{
initStrings
}
from
"
../api/strings
"
;
const
READY_STATE
=
"
ready
"
;
const
READY_STATE
=
"
ready
"
;
...
@@ -78,9 +79,11 @@ const WaitRoom = () => {
...
@@ -78,9 +79,11 @@ const WaitRoom = () => {
initInfo
:
{
dbUrl
:
NeosConfig
.
cardsDbUrl
},
initInfo
:
{
dbUrl
:
NeosConfig
.
cardsDbUrl
},
});
});
// 初始化文案
await
initStrings
();
// 初始化wasm
// 初始化wasm
const
wasm
=
await
rustInit
();
await
rustInit
();
console
.
log
(
wasm
);
};
};
init
();
init
();
...
...
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