ANSI C 中的超便携、小型复杂配置文件库? [英] Ultra-portable, small complex config file library in ANSI C?

查看:18
本文介绍了ANSI C 中的超便携、小型复杂配置文件库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个非常便携、简约/小型的 ANSI C 中的 XML/配置语言库,没有外部依赖项(或很少),编译到小于 100K.我需要它用于中等复杂的配置文件,并且它必须支持 Unicode.

I'm looking for a very portable, minimalistic/small XML/configuration language library in ANSI C with no external dependencies (or very few), compiling down to less than 100K. I need it for a moderately complex configuration file, and it must support Unicode.

更多要求:

  1. 可以使用/嵌入/静态链接到专有代码.信用到期时将始终给予信用.
  2. 不一定是 XML.
  3. 真的,干净的代码/没有奇怪或不一致的字符串处理.
  4. UTF-8.
  1. OK to use/embed/statically link into proprietary code. Credit will always will be given where credit is due.
  2. Not necessarily XML.
  3. Really, clean code/no weird or inconsistent string handling.
  4. UTF-8.

谢谢各位.

推荐答案

这有点类似于这个问题:Is there a good tiny嵌入式 C 项目的 XML 解析器?

This is somehow similar to this question: Is there a good tiny XML parser for an embedded C project?

我能够为 C 调整以下 XML 解析器库的编译标志,并在我的 Ubuntu 机器上减少了 50% 以上的大小.Mini-XML 是唯一接近您要求的:

I was able to tweak the compilation flags of the following XML parser libraries for C, and cut down more than 50% of their size on my Ubuntu machine. Mini-XML is the only one close to what you requested:

  • Mini-XML (36K)
  • Expat (124K)
  • RXP (184K)

这篇关于ANSI C 中的超便携、小型复杂配置文件库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆