宽字符

致虚极,守静笃。

Donuts

博主本项目地址
https://github.com/wchar-net/donuts


前端采用 bootstrap-admin 做的一套后台管理系统

点击访问 bootstrap-admin 前端模板地址

java22+ gradle mysql


目前阶段

国际化配置文件 搜索 个人中心 控制页面权限按钮显示 目前尚未完善

导入数据库文件 doc/sql/sql.sql

博主是后台程序员,前端写的不是很好,感谢 bootstrap-admin 提供的前端模板

请配置文件上传路径,不然头像显示不出来


当前版本

0.0.1-SNAPSHOT

账号/密码

donuts/123456 管理员

user/123456 模拟普通用户

Swagger地址

http://localhost:8080/doc.html

阅读全文 »

docker启动redis哨兵

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
version: '3.8'
services:
redis-master:
container_name: redis-master
image: 'bitnami/redis:latest'
environment:
- REDIS_REPLICATION_MODE=master
- REDIS_PASSWORD=redispassword
ports:
- "6379:6379"
redis-slave:
container_name: slave-redis
image: 'bitnami/redis:latest'
environment:
- REDIS_REPLICATION_MODE=slave
- REDIS_MASTER_HOST=redis-master
- REDIS_MASTER_PASSWORD=redispassword
- REDIS_PASSWORD=redispassword
ports:
- "7000:6379"
depends_on:
- redis-master
redis-sentinel-1:
image: 'bitnami/redis-sentinel:latest'
container_name: sentinel-1
environment:
- REDIS_MASTER_SET=mymaster
- REDIS_MASTER_HOST=127.0.0.1
- REDIS_MASTER_PASSWORD=redispassword
- REDIS_SENTINEL_DOWN_AFTER_MILLISECONDS=10000
depends_on:
- redis-master
- redis-slave
ports:
- "26379:26379"
redis-sentinel-2:
image: 'bitnami/redis-sentinel:latest'
container_name: sentinel-2
environment:
- REDIS_MASTER_SET=mymaster
- REDIS_MASTER_HOST=127.0.0.1
- REDIS_MASTER_PASSWORD=redispassword
- REDIS_SENTINEL_DOWN_AFTER_MILLISECONDS=10000
depends_on:
- redis-master
- redis-slave
ports:
- "26380:26379"
redis-sentinel-3:
image: 'bitnami/redis-sentinel:latest'
container_name: sentinel-3
environment:
- REDIS_MASTER_SET=mymaster
- REDIS_MASTER_HOST=127.0.0.1
- REDIS_MASTER_PASSWORD=redispassword
- REDIS_SENTINEL_DOWN_AFTER_MILLISECONDS=10000
depends_on:
- redis-master
- redis-slave
ports:
- "26381:26379"
1
docker-compose up -d
阅读全文 »

依赖安装

1
2
cargo install wasm-pack
cargo install cargo-generate

使用模板创建

1
cargo generate --git https://github.com/rustwasm/wasm-pack-template

构建

1
wasm-pack build --target web

js调用

pkg 文件夹下新建 index.html

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>测试调用</title>
</head>

<body>
<script type="module">
import initSync, { greet } from './wchar_wasm_helloworld.js';
await initSync();
greet();
</script>
</body>

</html>
阅读全文 »

安装 msys2

https://www.msys2.org/

A.设置清华源

1
sed -i "s#https\?://mirror.msys2.org/#https://mirrors.tuna.tsinghua.edu.cn/msys2/#g" /etc/pacman.d/mirrorlist*

B.安装 mingw-w64

1
pacman -S mingw-w64-ucrt-x86_64-toolchain

C.添加环境变量
找到 msys2 安装位置下

1
ucrt64/bin

安装 cross-rs

https://github.com/cross-rs/cross

1
cargo install cross --git https://github.com/cross-rs/cross

也可以直接下载 exe 二进制文件并添加到环境变量中

安装 Docker并启动

https://www.docker.com/

配置 rust

1
2
rustup toolchain install stable-x86_64-pc-windows-gnu
rustup target add x86_64-pc-windows-gnu

构建

1
cross build --target x86_64-unknown-linux-musl --release
阅读全文 »
0%