V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
proxytoworld
V2EX  ›  问与答

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

  •  
  •   proxytoworld · Aug 19, 2022 · 1720 views
    This topic created in 1357 days ago, the information mentioned may be changed or developed.

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

    1 replies    2022-08-19 10:31:57 +08:00
    AddictX
        1
    AddictX  
       Aug 19, 2022
    https://doc.rust-lang.org/std/macro.include_bytes.html
    效果和`Go embed`差不多,直接绑定到变量。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3466 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 12:04 · PVG 20:04 · LAX 05:04 · JFK 08:04
    ♥ Do have faith in what you're doing.