# Ubuntu
apt install qemu-kvm qemu-utils
# Fedora
dnf install qemu-system-x86-core qemu-ui-gtk qemu-audio-pa qemu-device-usb-host qemu-img
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[custom] | |
; AI | |
ruleset=🤖️ 人工智能,[]DOMAIN-SUFFIX,openai.com | |
ruleset=🤖️ 人工智能,[]DOMAIN,cdn.oaistatic.com | |
ruleset=🤖️ 人工智能,[]DOMAIN-SUFFIX,claude.ai | |
ruleset=🤖️ 人工智能,[]DOMAIN-SUFFIX,chatgpt.com | |
;解决 DNS 泄露,无分流群组 | |
ruleset=✅ 自定义,[]DOMAIN-SUFFIX,xn--ngstr-lra8j.com | |
ruleset=✅ 自定义,[]DOMAIN-SUFFIX,services.googleapis.cn | |
ruleset=✅ 自定义,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/GoogleCNProxyIP.list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"fileIcons":{"defaultIcon":{"name":"file"},"icons":[{"name":"html","fileExtensions":["htm","html","xhtml","html_vm","asp"]},{"name":"pug","fileExtensions":["jade","pug"],"fileNames":[".pug-lintrc",".pug-lintrc.js",".pug-lintrc.json"]},{"name":"markdown","fileExtensions":["md","markdown","rst"]},{"name":"blink","fileExtensions":["blink"],"light":true},{"name":"css","fileExtensions":["css"]},{"name":"sass","fileExtensions":["scss","sass"]},{"name":"less","fileExtensions":["less"]},{"name":"json","fileExtensions":["json","jsonc","tsbuildinfo","json5","jsonl","ndjson"],"fileNames":[".jscsrc",".jshintrc","composer.lock",".jsbeautifyrc",".esformatter","cdp.pid",".lintstagedrc"]},{"name":"jinja","fileExtensions":["jinja","jinja2","j2","jinja-html"],"light":true},{"name":"proto","fileExtensions":["proto"]},{"name":"playwright","fileNames":["playwright.config.js","playwright.config.mjs","playwright.config.ts","playwright.config.base.js","playwright.config.base.mjs","playwright.config.base.ts","playwright-ct.config.js |
这两个类型有一定联系,但是并不是由谁决定谁。
- 仅实现 Send:Cell 以及 RefCell,可以在线程之间移动所有权,但是不能共享,也就是不能多个线程同时修改其内部值
- 仅实现 Sync:MutexGuard(各种锁的 guard),它们的共享引用可以在线程之间解锁(
lock
),但是所有权不能直接被转移 - 实现 Send 和 Sync:大多数类型都设置了 Send 和 Sync
利用 build.rs 构建脚本,https://doc.rust-lang.org/stable/cargo/reference/build-scripts.html#rustc-link-lib
主要是使用以下两个字段来构建:
- cargo:rustc-link-lib=[KIND=]NAME — 告知 Cargo 通过 -l 去链接一个指定的库,往往用于链接一个本地库,通过 FFI
其中 KIND 可以是以下值之一:
- Rust API 指南:https://rust-lang.github.io/api-guidelines/checklist.html
- 中文讲解地址:https://www.bilibili.com/video/BV1Pu4y1Z7dT/?spm_id_from=333.337.search-card.all.click&vd_source=2294cb13a82ee07684c6d3607932c747
四个原则:
- 不意外(unsurprising)
- 灵活(flexible)
- 显而易见(obvious)
- 受约束(constrained)