build(wasm): libconfig now builds and works in wasm

This commit is contained in:
2025-12-03 08:54:33 -05:00
parent 067a3a0d51
commit 1a7f4837c6
9 changed files with 138 additions and 7 deletions

19
examples/wasm.cpp Normal file
View File

@@ -0,0 +1,19 @@
#include "fourdst/config/config.h"
#include <string>
#include <vector>
#include <iostream>
#include <filesystem>
int main(int argc, char* argv[]) {
fourdst::config::Config& config = fourdst::config::Config::getInstance();
config.loadConfig("/input.yaml");
auto men = config.get<std::vector<std::string>>("men", {});
for (const auto& name : men) {
std::cout << "men are " << name << std::endl;
}
}