update curlywas, use 'include "microw8-api.cwa"' in examples

This commit is contained in:
2022-02-26 23:41:15 +01:00
parent 47ad3b4f30
commit eb7c33d412
13 changed files with 137 additions and 78 deletions

View File

@@ -291,7 +291,7 @@ impl BaseModule {
pub fn write_as_cwa<P: AsRef<Path>>(&self, path: P) -> Result<()> {
fn inner(mut file: File, base: &BaseModule) -> Result<()> {
writeln!(file, ";; MicroW8 APIs, to be `include`d in CurlyWas sources")?;
writeln!(file, "// MicroW8 APIs, to be `include`d in CurlyWas sources")?;
writeln!(file, "import \"env.memory\" memory({});", base.memory)?;
writeln!(file)?;
for &(module, ref name, type_id) in &base.function_imports {