学习v

v 是一种编程 building 语言, 具体查看文档https://github.com/vlang/v/blob/master/doc/docs.md 另外一个是 bun https://github.com/oven-sh/bun 看看官网介绍 bun 吧:

1
Bun is under active development. Use it to speed up your development workflows or run simpler production code in resource-constrained environments like serverless functions. We're working on more complete Node.js compatibility and integration with existing frameworks. Join the Discord and watch the GitHub repository to keep tabs on future releases.

具体参考一个 demo

1
2
3
4
5
6
7
8
#!/usr/local/bin/v run
import term

term.clear()
system("cd frontend && bun run build")
system("cd server && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags '-s -w' -o rdm && upx -9 rdm && mv rdm ..")

println("build done!")

上面是一个虚拟编译 rdm 这个程序,注意需要先安装 v 和 bun。 注意这次的 vue 文档 https://v2.cn.vuejs.org/v2/guide/installation.html

Licensed under CC BY-NC-SA 4.0
最后更新于 Jan 06, 2025 05:52 UTC
comments powered by Disqus
Built with Hugo
主题 StackJimmy 设计
Caret Up