V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
proxytoworld
V2EX  ›  问与答

rust 有没有像 windows c++平台那样 优雅的嵌入资源(resource)到编译出来的二进制文件内的库呢

  •  
  •   proxytoworld · 2022-08-19 10:09:35 +08:00 · 838 次点击
    这是一个创建于 608 天前的主题,其中的信息可能已经有所发展或是发生改变。

    并且可以方便提取,想实现某些 exe ,提取程序运行的 dll/各种资源 等到某个目录内,或者内存加载

    1 条回复    2022-08-19 10:31:57 +08:00
    AddictX
        1
    AddictX  
       2022-08-19 10:31:57 +08:00
    https://doc.rust-lang.org/std/macro.include_bytes.html
    效果和`Go embed`差不多,直接绑定到变量。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1408 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 17:26 · PVG 01:26 · LAX 10:26 · JFK 13:26
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.