License MIT 

A gem which can gen VFS YAML file.

vfs yamlwriter lets you create clang opt "-ivfsoverlay" ymal file, map virtual path to real path.

  • ✅ It can gen VFS YAML.


Add this line to your application's Gemfile:

gem 'yaml-vfs'

And then execute:

# bundle install
$ bundle install

Or install it yourself as:

# gem install
$ gem install yaml-vfs


The command should be executed when your want VFS YAML file.

# write the VFS YAML file to --output-path=<path>
$ vfs yamlwriter --framework-path=<path> --real-headers-dir=<path> --real-modules-dir=<path> --output-path=<path>

# write the VFS YAML file to .
$ vfs yamlwriter --framework-path=<path> --real-headers-dir=<path> --real-modules-dir=<path>

Option && Flags


  • vfs yamlwriter --framework-path --real-headers-dir --real-modules-dir [--output-path]


  • --framework-path=<path>: framework path
  • --real-headers-dir=<path>: real header path
  • --real-modules-dir=<path>: real modules path
  • --output-path=<path>: vfs yaml file output path


To begin gen an yaml VFS file start by create an FileCollector:

require 'yaml_vfs'
modules = ['./module.modulemap', './module.private.modulemap']
headers_path = ['./A.h', './B.h']
vfs = VFS::FileCollector.new('./A.framework', modules, headers_path)

or set use path:

require 'yaml_vfs'
modules = ['./module.modulemap', './module.private.modulemap']
headers_path = ['./A.h', './B.h']
vfs = VFS::FileCollector.new_from_real_headers_dir('./A.framework', './module_path', './headers')

Command Line Tool

Installing the 'yaml-vfs' gem will also install two command-line tool vfs which you can use to generate VFS YAML file.

For more information consult vfs --help or vfs yamlwriter --help.


Bug reports and pull requests are welcome on GitHub at yaml-vfs. This project is intended to be a safe, welcoming space for collaboration.


The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the yaml-vfs project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.