How creating a .blend file without whole blender program

Hello, I’d like to write a little extension to Ruby, mRuby, Crystal. etc.
I would like to create a website where I could download ready-made items to the blender file. For example charts with color and scaling a objects. Unfortunately the server does not accept installing any programs. The blender itself would be too big in memory.

I need to start with a simple program in C/C++ that would create a .blend file. Nothing more. Simple Makefile and C program with one line similar:

/blender/tests/gtests/blenloader/blendfile_load_test.cc

but for writing (not reading) a empty file. In future meybe more languages : Rust, Perl, Nim, Zig etc.