Then include it with compile_resources, load it with gio::resources_register_include!("my.gresource").expect("Failed to register resources."); and finally access it in some way similar to let settings = gio::Settings::new("org.domain.myapp");.
I have tried several different ways and all of them fail with: Settings schema ‘org.domain.myapp’ is not installed
I don’t think this would work out of the box; no such behaviour is documented for GSettings.
If you wish to load an embedded schema, you’d likely need to embed the compiled settings as a resource, copy it from resources to a temporary directory on startup, create a schema source for that directory (see SettingsSchemaSource.new_from_directory, and then create your GSettings object with your schema explicitly looked up from that source.
That’d be rather… unusual behaviour for a Gtk application, tho. Why do you wish to include the settings schema as a resource?
It does not matter if you do it for your own settings: GTK and other libraries have their own settings as well, which means they would need to switch to embedded schemas first.