INNER CODE UNIT · Python

kv_base64

biowasm/biowasm · bin/compile.py:127

			kv_value, kv_base64 = get_file_contents(str(DIR_BUILD / path))

			# If adding new file, or hash of a file has changed, update the manifest
			if path not in MANIFEST or MANIFEST[path] != kv_key:
				print(f"Adding {path} to list of KVs to upload...")
				MANIFEST[path] = kv_key
				to_upload.append({
					"key": kv_key,
					"value": kv_value,
					"base64": kv_base64
				})

	# Save manifest JSON files
	with open(DIR_CF_UPLOAD, "w", encoding="utf-8") as f:
		json.dump(to_upload, f, ensure_ascii=False)
	with open(DIR_MANIFEST, "w", encoding="utf-8") as f:
		json.dump(MANIFEST, f, ensure_ascii=False, sort_keys=True, indent=2)
	exec(f"rm {DIR_MANIFEST_TEMP}")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…