MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / generate

Function generate

crates/codegen/src/lib.rs:32–43  ·  view source on GitHub ↗
(module: &ModuleDef, lang: &dyn Lang, options: &CodegenOptions)

Source from the content-addressed store, hash-verified

30}
31
32pub fn generate(module: &ModuleDef, lang: &dyn Lang, options: &CodegenOptions) -> Vec<OutputFile> {
33 itertools::chain!(
34 util::iter_tables(module, options.visibility).map(|tbl| lang.generate_table_file(module, tbl)),
35 module.views().map(|view| lang.generate_view_file(module, view)),
36 module.types().flat_map(|typ| lang.generate_type_files(module, typ)),
37 util::iter_reducers(module, options.visibility).map(|reducer| lang.generate_reducer_file(module, reducer)),
38 util::iter_procedures(module, options.visibility)
39 .map(|procedure| lang.generate_procedure_file(module, procedure)),
40 lang.generate_global_files(module, options),
41 )
42 .collect()
43}
44
45pub struct OutputFile {
46 pub filename: String,

Callers 14

run_oidc_testFunction · 0.50
generateMethod · 0.50
get_or_create_keysFunction · 0.50
decode_encoded_tokenFunction · 0.50
extract_payloadFunction · 0.50
mainFunction · 0.50

Calls 1

collectMethod · 0.45

Used in the wild real call sites across dependent graphs

searching dependent graphs…