binaryen-sys 0.12.0

Bindings to the binaryen library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/python

import os

root = os.path.dirname(os.path.dirname(__file__))

infile = os.path.join(root, 'src', 'passes', 'OptimizeInstructions.wast')
outfile = os.path.join(root, 'src', 'passes',
                       'OptimizeInstructions.wast.processed')

out = open(outfile, 'w')

for line in open(infile):
    out.write('"' + line.strip().replace('"', '\\"') + '\\n"\n')

out.close()