From 8bea32beb87156a71f411b9a33b95d875104d5bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=BE=E4=B8=80=E9=A5=BC?= Date: Mon, 23 Sep 2024 18:32:04 +0800 Subject: [PATCH] wopan --- client/uniapp/package.json | 2 +- client/uniapp/src/interceptors/http.ts | 6 +- client/uniapp/src/interceptors/request.ts | 4 +- client/uniapp/src/interceptors/route.ts | 4 +- client/uniapp/src/main.ts | 7 +- client/uniapp/src/model/content.ts | 2 +- client/uniapp/src/pages/index/index.vue | 2 +- .../uniapp/src/pages/moment/moment_list.vue | 5 +- client/uniapp/src/pages/wopan/list.vue | 13 ++- client/uniapp/src/pages/wopan/login.vue | 37 ++++--- client/uniapp/src/service/moment.ts | 5 +- client/uniapp/src/service/user.ts | 1 - client/uniapp/src/service/wopan.ts | 7 +- client/uniapp/src/store/content.ts | 7 +- client/uniapp/src/store/global.ts | 5 +- client/uniapp/src/store/index.ts | 24 +---- client/uniapp/src/store/user.ts | 21 ++-- client/uniapp/src/store/wopan.ts | 102 ++++++++++++++---- client/web/package.json | 4 +- client/web/src/mixin/store/content.ts | 4 +- client/web/src/mixin/store/global.ts | 3 +- server/go/proxy/main.go | 20 ++++ server/go/proxy/wopan.go | 32 ++++++ {client => server}/rust/.devcontainer.json | 0 {client => server}/rust/Cargo.toml | 0 {client => server}/rust/cdylib/Cargo.toml | 0 {client => server}/rust/cdylib/src/export.rs | 0 {client => server}/rust/cdylib/src/lib.rs | 0 {client => server}/rust/cdylib/src/main.rs | 0 {client => server}/rust/wasm/.appveyor.yml | 0 {client => server}/rust/wasm/.cargo-ok | 0 {client => server}/rust/wasm/.gitignore | 0 {client => server}/rust/wasm/.travis.yml | 0 {client => server}/rust/wasm/Cargo.toml | 0 {client => server}/rust/wasm/LICENSE_APACHE | 0 {client => server}/rust/wasm/LICENSE_MIT | 0 {client => server}/rust/wasm/README.md | 0 {client => server}/rust/wasm/src/lib.rs | 0 {client => server}/rust/wasm/src/utils.rs | 0 {client => server}/rust/wasm/tests/web.rs | 0 thirdparty/diamond | 2 +- 41 files changed, 218 insertions(+), 101 deletions(-) create mode 100644 server/go/proxy/main.go create mode 100644 server/go/proxy/wopan.go rename {client => server}/rust/.devcontainer.json (100%) rename {client => server}/rust/Cargo.toml (100%) rename {client => server}/rust/cdylib/Cargo.toml (100%) rename {client => server}/rust/cdylib/src/export.rs (100%) rename {client => server}/rust/cdylib/src/lib.rs (100%) rename {client => server}/rust/cdylib/src/main.rs (100%) rename {client => server}/rust/wasm/.appveyor.yml (100%) rename {client => server}/rust/wasm/.cargo-ok (100%) rename {client => server}/rust/wasm/.gitignore (100%) rename {client => server}/rust/wasm/.travis.yml (100%) rename {client => server}/rust/wasm/Cargo.toml (100%) rename {client => server}/rust/wasm/LICENSE_APACHE (100%) rename {client => server}/rust/wasm/LICENSE_MIT (100%) rename {client => server}/rust/wasm/README.md (100%) rename {client => server}/rust/wasm/src/lib.rs (100%) rename {client => server}/rust/wasm/src/utils.rs (100%) rename {client => server}/rust/wasm/tests/web.rs (100%) diff --git a/client/uniapp/package.json b/client/uniapp/package.json index fe5a3227c..e24a438d6 100644 --- a/client/uniapp/package.json +++ b/client/uniapp/package.json @@ -89,7 +89,7 @@ "@dcloudio/uni-quickapp-webview": "3.0.0-4020420240722002", "@dcloudio/uni-ui": "^1.5.6", "dayjs": "1.11.12", - "diamond": "file:../../thirdparty/diamond", + "diamond": "file:..\\..\\thirdparty\\diamond", "pinia": "2.2.0", "pinia-plugin-persistedstate": "3.2.1", "vue": "3.4.21", diff --git a/client/uniapp/src/interceptors/http.ts b/client/uniapp/src/interceptors/http.ts index 77f1393bf..4185e1e3b 100644 --- a/client/uniapp/src/interceptors/http.ts +++ b/client/uniapp/src/interceptors/http.ts @@ -1,7 +1,7 @@ /* eslint-disable no-param-reassign */ -import qs from 'qs' -import { useUserStore } from '@/store' +import { useUserStore } from '@/store/user' import { platform } from '@/utils/platform' +import { toUrlParams } from 'diamond/compatible' export type CustomRequestOptions = UniApp.RequestOptions & { query?: Record @@ -18,7 +18,7 @@ const httpInterceptor = { invoke(options: CustomRequestOptions) { // 接口请求支持通过 query 参数配置 queryString if (options.query) { - const queryStr = qs.stringify(options.query) + const queryStr = toUrlParams(options.query) if (options.url.includes('?')) { options.url += `&${queryStr}` } else { diff --git a/client/uniapp/src/interceptors/request.ts b/client/uniapp/src/interceptors/request.ts index 748fa2b54..281a9d728 100644 --- a/client/uniapp/src/interceptors/request.ts +++ b/client/uniapp/src/interceptors/request.ts @@ -1,11 +1,11 @@ import uniHttp from '@/utils/request' import { API_HOST } from '@/env/config' -import { userStore } from '@/store' +import { useUserStore } from '@/store/user' export function init() { uniHttp.defaults.baseUrl = API_HOST const token = uni.getStorageSync('token') - + const userStore = useUserStore() uniHttp.defaults.header.Authorization = token || userStore.token // 添加请求拦截器 diff --git a/client/uniapp/src/interceptors/route.ts b/client/uniapp/src/interceptors/route.ts index 5c28fc173..f79d04f00 100644 --- a/client/uniapp/src/interceptors/route.ts +++ b/client/uniapp/src/interceptors/route.ts @@ -4,7 +4,7 @@ * 可以设置路由白名单,或者黑名单,看业务需要选哪一个 * 我这里应为大部分都可以随便进入,所以使用黑名单 */ -import { useUserStore } from '@/store' +import { useUserStore } from '@/store/user' import { getNeedLoginPages, needLoginPages as _needLoginPages } from '@/utils' // TODO Check @@ -12,7 +12,7 @@ const loginRoute = '/pages/login/index' const isLogined = () => { const userStore = useUserStore() - return userStore.info !== null + return userStore.auth !== null } const isDev = import.meta.env.DEV diff --git a/client/uniapp/src/main.ts b/client/uniapp/src/main.ts index 86510a938..50b360983 100644 --- a/client/uniapp/src/main.ts +++ b/client/uniapp/src/main.ts @@ -1,22 +1,23 @@ import { createSSRApp } from 'vue' import App from './App.vue' -import store, { init as storeInit } from './store' +import * as Pinia from 'pinia' import { init as uniHttpInit } from '@/interceptors/request' import i18n from './locale/index' import { routeInterceptor, requestInterceptor, prototypeInterceptor } from './interceptors' import 'virtual:uno.css' import '@/style/index.scss' +import '@/service/wopan' export function createApp() { const app = createSSRApp(App) - app.use(store) + app.use(Pinia.createPinia()) app.use(i18n) app.use(routeInterceptor) app.use(requestInterceptor) app.use(prototypeInterceptor) - storeInit() uniHttpInit() return { app, + Pinia, // 此处必须将 Pinia 返回 } } diff --git a/client/uniapp/src/model/content.ts b/client/uniapp/src/model/content.ts index bd5bfdebd..af55ffe5c 100644 --- a/client/uniapp/src/model/content.ts +++ b/client/uniapp/src/model/content.ts @@ -1,4 +1,4 @@ -type ContentExt = { +export type ContentExt = { likeCount: number commentCount: number } diff --git a/client/uniapp/src/pages/index/index.vue b/client/uniapp/src/pages/index/index.vue index 2b0c24d66..ffd4ede95 100644 --- a/client/uniapp/src/pages/index/index.vue +++ b/client/uniapp/src/pages/index/index.vue @@ -12,7 +12,7 @@ class="bg-white overflow-hidden pt-2 px-4" :style="{ marginTop: safeAreaInsets?.top + 'px' }" > - + diff --git a/client/uniapp/src/pages/moment/moment_list.vue b/client/uniapp/src/pages/moment/moment_list.vue index a50ebe810..5cb4b096b 100644 --- a/client/uniapp/src/pages/moment/moment_list.vue +++ b/client/uniapp/src/pages/moment/moment_list.vue @@ -131,13 +131,14 @@ diff --git a/client/uniapp/src/pages/wopan/login.vue b/client/uniapp/src/pages/wopan/login.vue index bfc62a4c0..33f9be6b6 100644 --- a/client/uniapp/src/pages/wopan/login.vue +++ b/client/uniapp/src/pages/wopan/login.vue @@ -16,22 +16,26 @@ + use-suffix-slot + v-model="model.smsCode" + placeholder="请输入验证码" + :rules="[{ required: true, message: '请填写验证码' }]" + > + + 提交 @@ -44,20 +48,23 @@ import PLATFORM from '@/utils/platform' import { useToast } from 'wot-design-uni' import * as wopan from 'diamond/wopan' + +import { useWopanStore } from '@/store/wopan' + defineOptions({ name: 'WopanLogin', }) - +const wopanStore = useWopanStore() // 获取屏幕边界到安全区域距离 const { safeAreaInsets } = uni.getSystemInfoSync() const { success: showSuccess } = useToast() const model = reactive<{ phone: string - password: string + smsCode: string }>({ phone: '', - password: '', + smsCode: '', }) onLoad(() => { @@ -66,12 +73,16 @@ onLoad(() => { const form = ref() +function sendSmsCode() { + wopan.sendMessageCodeBase(model.phone) +} + function handleSubmit() { form.value .validate() - .then(({ valid, errors }) => { + .then(async ({ valid, errors }) => { if (valid) { - const res = wopan.PcWebLogin(model.phone, model.password) + await wopanStore.AppLoginByMobile(model) showSuccess({ msg: '校验通过', }) diff --git a/client/uniapp/src/service/moment.ts b/client/uniapp/src/service/moment.ts index 22be5bb75..6d7006408 100644 --- a/client/uniapp/src/service/moment.ts +++ b/client/uniapp/src/service/moment.ts @@ -1,9 +1,10 @@ import { API_HOST } from '@/env/config' import type { MomentList } from '@/model/moment' import request from '@/utils/request' -import { userStore } from '@/store' -import moment from '@/pages/moment/moment_list.vue' +import moment from '@/pages/moment/moment_list.vue' +import { useUserStore } from '@/store/user' +const userStore = useUserStore() class MomentService { static async getMomentList(pageNo: number, pageSize: number): Promise { const { data } = await request.get>( diff --git a/client/uniapp/src/service/user.ts b/client/uniapp/src/service/user.ts index 733ef1903..f54490316 100644 --- a/client/uniapp/src/service/user.ts +++ b/client/uniapp/src/service/user.ts @@ -1,7 +1,6 @@ import { API_HOST } from '@/env/config' import type { MomentList } from '@/model/moment' import request from '@/utils/request' -import { userStore } from '@/store' import moment from '@/pages/moment/moment_list.vue' class UserService { diff --git a/client/uniapp/src/service/wopan.ts b/client/uniapp/src/service/wopan.ts index e52974e38..9b1e1678d 100644 --- a/client/uniapp/src/service/wopan.ts +++ b/client/uniapp/src/service/wopan.ts @@ -17,7 +17,6 @@ client.fetch = async function (url, method, headers, body) { } client.setToken(uni.getStorageSync('accessToken'), uni.getStorageSync('accessToken')) client.psToken = uni.getStorageSync('psToken') - -const wopanClient = client - -export default wopanClient +client.proxy = 'http://localhost:8080' +console.log(client) +export default client diff --git a/client/uniapp/src/store/content.ts b/client/uniapp/src/store/content.ts index 9bd3efbda..1b53a9f30 100644 --- a/client/uniapp/src/store/content.ts +++ b/client/uniapp/src/store/content.ts @@ -1,7 +1,7 @@ import { ObjMap } from '@/utils/user' import { defineStore } from 'pinia' -export interface ContentStore { +export interface ContentState { moment: any note?: any diary?: any @@ -12,7 +12,7 @@ export interface ContentStore { commentCache: Map } -const state: ContentStore = { +const state: ContentState = { moment: null, commentCache: new Map(), } @@ -28,8 +28,7 @@ const getters = { }, } -export const useContentStore = defineStore({ - id: 'content', +export const useContentStore = defineStore('content', { state: () => state, getters, actions, diff --git a/client/uniapp/src/store/global.ts b/client/uniapp/src/store/global.ts index e85ddd728..1872d7e4d 100644 --- a/client/uniapp/src/store/global.ts +++ b/client/uniapp/src/store/global.ts @@ -1,7 +1,7 @@ import { defineStore } from 'pinia' import { Platform } from '@/env/platform' -interface GlobalState { +export interface GlobalState { counter: number platform: Platform } @@ -11,8 +11,7 @@ const state: GlobalState = { platform: Platform.H5, } -export const useGlobalStore = defineStore({ - id: 'global', +export const useGlobalStore = defineStore('global', { state: () => state, getters: { doubleCount: (state) => state.counter * 2, diff --git a/client/uniapp/src/store/index.ts b/client/uniapp/src/store/index.ts index 60e1f5d70..51e01b29b 100644 --- a/client/uniapp/src/store/index.ts +++ b/client/uniapp/src/store/index.ts @@ -5,7 +5,7 @@ import { useGlobalStore } from '@/store/global' import { useContentStore } from '@/store/content' import { useWopanStore } from '@/store/wopan' -const store = createPinia() +/* const store = createPinia() store.use( createPersistedState({ storage: { @@ -13,24 +13,4 @@ store.use( setItem: uni.setStorageSync, }, }), -) - -export let userStore -export let globalStore -export let contentStore -export let wopanStore - -export function init() { - globalStore = useGlobalStore() - userStore = useUserStore() - contentStore = useContentStore() - wopanStore = useWopanStore() - if (!userStore.auth) { - userStore.getAuth() - } -} - -export default store - -// 模块统一导出 -export * from './user' +) */ diff --git a/client/uniapp/src/store/user.ts b/client/uniapp/src/store/user.ts index 0f30d6a12..85b35adcb 100644 --- a/client/uniapp/src/store/user.ts +++ b/client/uniapp/src/store/user.ts @@ -5,32 +5,32 @@ import type { User } from '@/model/user' import request from '@/utils/request' export interface UserState { - info: any + auth: any token: string userCache: Map } -export const state: UserState = { - info: null, +const state: UserState = { + auth: null, token: '', userCache: new Map(), } const getters = { - getUser: (state) => { - return (id): User => state.userCache.get(id) + getUser: (state: UserState) => { + return (id: number): User => state.userCache.get(id) }, } const actions = { async getAuth() { - if (state.info) return + if (state.auth) return const token = uni.getStorageSync('token') if (token) { state.token = token const { data } = await request.get(API_HOST + `/api/v1/auth`) // 跟后端的初始化配合 - if (data.code === 0) state.info = data.data + if (data.code === 0) state.auth = data.data } }, async login(params) { @@ -41,7 +41,7 @@ const actions = { throw new Error('Bad credentials') } - state.info = data.user + state.auth = data.user state.token = data.token uni.setStorageSync('token', data.token) request.defaults.header.Authorization = data.token @@ -59,7 +59,7 @@ const actions = { 'content-type': 'application/json', }, }) - state.info = details.user + state.auth = details.user state.token = details.token uni.setStorageSync('token', details.token) request.defaults.header.Authorization = details.token @@ -92,8 +92,7 @@ const actions = { }, } -export const useUserStore = defineStore({ - id: 'user', +export const useUserStore = defineStore('user', { state: () => state, getters, actions, diff --git a/client/uniapp/src/store/wopan.ts b/client/uniapp/src/store/wopan.ts index f5226336f..7f7e4e9a0 100644 --- a/client/uniapp/src/store/wopan.ts +++ b/client/uniapp/src/store/wopan.ts @@ -1,31 +1,47 @@ import wopanClient from '@/service/wopan' import * as wopan from 'diamond/wopan' import { defineStore } from 'pinia' -interface File { - fid: string - name: string - id: string - type: number - subFiles: Files -} -interface Files { - parent: File - files: File[] +interface FileNode { + parent: wopan.File + file: wopan.File + subFiles: FileNode[] pageNo: number pageSize: number } export interface WopanState { - files: Files + file: FileNode + curDir: FileNode accessToken: string refreshToken: string psToken: string phone: string } -export const state: WopanState = { - files: null, +const accessTokenKey = 'accessToken' +const refreshTokenKey = 'refreshToken' +const psTokenKey = 'psToken' +const phoneKey = 'phone' +const rootFile = { + parent: null, + file: { + fid: '', + id: '', + name: '', + type: 1, + }, + subFiles: [], + pageNo: 0, + pageSize: 20, +} +const state: WopanState = { + accessToken: uni.getStorageSync(accessTokenKey), + phone: uni.getStorageSync(phoneKey), + psToken: uni.getStorageSync(psTokenKey), + refreshToken: uni.getStorageSync(refreshTokenKey), + file: rootFile, + curDir: rootFile, } const getters = {} @@ -33,7 +49,7 @@ const getters = {} const actions = { async PcWebLogin(params) { try { - const res = await wopan.PcWebLogin(params.phone, params.password) + await wopan.PcWebLogin(params.phone, params.password) } catch (error: any) { console.log(error) } @@ -41,18 +57,66 @@ const actions = { async PcLoginVerifyCode(params) { try { const res = await wopan.PcLoginVerifyCode(params.phone, params.password, params.messageCode) - uni.setStorageSync('accessToken', res.access_token) - uni.setStorageSync('refreshToken', res.refresh_token) + uni.setStorageSync(accessTokenKey, res.access_token) + uni.setStorageSync(refreshTokenKey, res.refresh_token) await uni.navigateTo({ url: '/wopan/list' }) } catch (error: any) { console.log(error) } }, + async AppLoginByMobile(params) { + console.log('params', params) + try { + console.log('params', params) + const res = await wopan.AppLoginByMobile(params.phone, params.smsCode) + state.accessToken = res.access_token + state.refreshToken = res.refresh_token + uni.setStorageSync(accessTokenKey, res.access_token) + uni.setStorageSync(refreshTokenKey, res.refresh_token) + } catch (error: any) { + console.log(error) + } + }, + async VerifySetPwd() { + try { + const res = await wopan.VerifySetPwd() + if (res.verifyResult === '01') { + await uni.navigateTo({ url: '/pages/wopan/login?setpwd=1' }) + } + } catch (e) { + uni.navigateTo({ url: '/pages/wopan/login' }) + console.log(e) + } + }, + async FileList() { + try { + const res = await wopan.QueryAllFiles( + wopan.SpaceType.Private, + '', + state.curDir.pageNo, + state.curDir.pageSize, + wopan.SortType.NameAsc, + '', + ) + state.curDir.subFiles.push( + res.files.map( + (file: wopan.File): FileNode => ({ + parent: state.curDir, + file, + subFiles: [], + pageNo: 0, + pageSize: 20, + }), + ), + ) + } catch (error: any) { + console.log(error) + } + }, } -export const useWopanStore = defineStore({ - id: 'wopan', +export const useWopanStore = defineStore('wopan', { state: () => state, - getters, actions, + getters, }) diff --git a/client/web/package.json b/client/web/package.json index 39b0d48e4..d8e382254 100644 --- a/client/web/package.json +++ b/client/web/package.json @@ -7,8 +7,8 @@ "packageManager": "pnpm@9.1.0", "scripts": { "protoc": "node ../../proto/generate.js grpc-web", - "wasm:build": "wasm-pack build ../rust/wasm --target web", - "wasm:link": "pnpm link ../rust/wasm/pkg", + "wasm:build": "wasm-pack build ../../server/rust/wasm --target web", + "wasm:link": "pnpm link ../../server/rust/wasm/pkg", "pc:dev": "vite --config mixin.pc.vite.config.ts --mode dev", "pc:build": "run-p type-check pc:build-only", "pc:preview": "vite preview --config mixin.pc.vite.config.ts --port 4173", diff --git a/client/web/src/mixin/store/content.ts b/client/web/src/mixin/store/content.ts index e820bb7ce..1825646b7 100644 --- a/client/web/src/mixin/store/content.ts +++ b/client/web/src/mixin/store/content.ts @@ -1,7 +1,7 @@ import { ObjMap } from "@/utils/user"; import { defineStore } from "pinia"; -export interface ContentStore { +export interface ContentState { moment: any; note?: any; diary?: any; @@ -12,7 +12,7 @@ export interface ContentStore { commentCache: Map; } -const state: ContentStore = { +const state: ContentState = { moment: null, commentCache: new Map(), }; diff --git a/client/web/src/mixin/store/global.ts b/client/web/src/mixin/store/global.ts index ba7fc58ee..735c79cbe 100644 --- a/client/web/src/mixin/store/global.ts +++ b/client/web/src/mixin/store/global.ts @@ -1,7 +1,8 @@ import { defineStore } from "pinia"; import { Platform } from "@/mixin/model/const"; -interface GlobalState { + +export interface GlobalState { counter: number; platform: Platform; } diff --git a/server/go/proxy/main.go b/server/go/proxy/main.go new file mode 100644 index 000000000..0d3c59ef8 --- /dev/null +++ b/server/go/proxy/main.go @@ -0,0 +1,20 @@ +package main + +import ( + "log" + "net/http" + "net/http/httputil" + "net/url" +) + +func main() { + target := "http://example.com" // 目标服务器的地址 + targetURL, err := url.Parse(target) + if err != nil { + log.Fatal(err) + } + + proxy := httputil.NewSingleHostReverseProxy(targetURL) + + log.Fatal(http.ListenAndServe(":8080", proxy)) +} diff --git a/server/go/proxy/wopan.go b/server/go/proxy/wopan.go new file mode 100644 index 000000000..a9bfaf462 --- /dev/null +++ b/server/go/proxy/wopan.go @@ -0,0 +1,32 @@ +package main + +import ( + "github.com/hopeio/utils/log" + "github.com/rs/cors" + "net/http" + "net/http/httputil" + "net/url" +) + +func main() { + proxy := &httputil.ReverseProxy{Rewrite: func(r *httputil.ProxyRequest) { + targets := r.In.Header["Target-Host"] + if len(targets) == 0 { + log.Error("no target specified") + return + } + target := targets[0] + targetUrl, _ := url.Parse(target) + r.Out.URL = r.In.URL + r.Out.Host = targetUrl.Host + r.Out.URL.Host = targetUrl.Host + r.Out.URL.Scheme = "https" + }, + Transport: &http.Transport{ + Proxy: http.ProxyFromEnvironment, // 代理使用 + ForceAttemptHTTP2: true, + }} + server := cors.AllowAll() + + log.Fatal(http.ListenAndServe(":8080", server.Handler(proxy))) +} diff --git a/client/rust/.devcontainer.json b/server/rust/.devcontainer.json similarity index 100% rename from client/rust/.devcontainer.json rename to server/rust/.devcontainer.json diff --git a/client/rust/Cargo.toml b/server/rust/Cargo.toml similarity index 100% rename from client/rust/Cargo.toml rename to server/rust/Cargo.toml diff --git a/client/rust/cdylib/Cargo.toml b/server/rust/cdylib/Cargo.toml similarity index 100% rename from client/rust/cdylib/Cargo.toml rename to server/rust/cdylib/Cargo.toml diff --git a/client/rust/cdylib/src/export.rs b/server/rust/cdylib/src/export.rs similarity index 100% rename from client/rust/cdylib/src/export.rs rename to server/rust/cdylib/src/export.rs diff --git a/client/rust/cdylib/src/lib.rs b/server/rust/cdylib/src/lib.rs similarity index 100% rename from client/rust/cdylib/src/lib.rs rename to server/rust/cdylib/src/lib.rs diff --git a/client/rust/cdylib/src/main.rs b/server/rust/cdylib/src/main.rs similarity index 100% rename from client/rust/cdylib/src/main.rs rename to server/rust/cdylib/src/main.rs diff --git a/client/rust/wasm/.appveyor.yml b/server/rust/wasm/.appveyor.yml similarity index 100% rename from client/rust/wasm/.appveyor.yml rename to server/rust/wasm/.appveyor.yml diff --git a/client/rust/wasm/.cargo-ok b/server/rust/wasm/.cargo-ok similarity index 100% rename from client/rust/wasm/.cargo-ok rename to server/rust/wasm/.cargo-ok diff --git a/client/rust/wasm/.gitignore b/server/rust/wasm/.gitignore similarity index 100% rename from client/rust/wasm/.gitignore rename to server/rust/wasm/.gitignore diff --git a/client/rust/wasm/.travis.yml b/server/rust/wasm/.travis.yml similarity index 100% rename from client/rust/wasm/.travis.yml rename to server/rust/wasm/.travis.yml diff --git a/client/rust/wasm/Cargo.toml b/server/rust/wasm/Cargo.toml similarity index 100% rename from client/rust/wasm/Cargo.toml rename to server/rust/wasm/Cargo.toml diff --git a/client/rust/wasm/LICENSE_APACHE b/server/rust/wasm/LICENSE_APACHE similarity index 100% rename from client/rust/wasm/LICENSE_APACHE rename to server/rust/wasm/LICENSE_APACHE diff --git a/client/rust/wasm/LICENSE_MIT b/server/rust/wasm/LICENSE_MIT similarity index 100% rename from client/rust/wasm/LICENSE_MIT rename to server/rust/wasm/LICENSE_MIT diff --git a/client/rust/wasm/README.md b/server/rust/wasm/README.md similarity index 100% rename from client/rust/wasm/README.md rename to server/rust/wasm/README.md diff --git a/client/rust/wasm/src/lib.rs b/server/rust/wasm/src/lib.rs similarity index 100% rename from client/rust/wasm/src/lib.rs rename to server/rust/wasm/src/lib.rs diff --git a/client/rust/wasm/src/utils.rs b/server/rust/wasm/src/utils.rs similarity index 100% rename from client/rust/wasm/src/utils.rs rename to server/rust/wasm/src/utils.rs diff --git a/client/rust/wasm/tests/web.rs b/server/rust/wasm/tests/web.rs similarity index 100% rename from client/rust/wasm/tests/web.rs rename to server/rust/wasm/tests/web.rs diff --git a/thirdparty/diamond b/thirdparty/diamond index c27b40138..5bd8b6e92 160000 --- a/thirdparty/diamond +++ b/thirdparty/diamond @@ -1 +1 @@ -Subproject commit c27b4013831778c9c2855ef2d976180d59f2328e +Subproject commit 5bd8b6e9296d54f854feec1e765bf7be37e44d24