git ssb

1+

yi / localnative



Tree: 2c1932822a8e06b5876eb875f19924a15ae91539

Files: 2c1932822a8e06b5876eb875f19924a15ae91539 / localnative-ios / RustLocalNative.swift

1098 bytesRaw
1/*
2 Local Native
3 Copyright (C) 2018-2019 Yi Wang
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Affero General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Affero General Public License for more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>.
17*/
18//
19// RustLocalNative.swift
20// localnative-ios
21//
22// Created by Yi Wang on 10/11/18.
23//
24
25class RustLocalNative {
26 func run(json_input: String) -> String {
27 let result = localnative_run(json_input)
28 let swift_result = String(cString: result!)
29 localnative_free(UnsafeMutablePointer(mutating: result))
30 return swift_result
31 }
32}
33

Built with git-ssb-web