Commit 26d49fc1 authored by Alexander Danilov's avatar Alexander Danilov

Заготовка для С-интерфейса библиотеки

parent b5f657e1
[lib]
name = "skaro"
crate-type = ["dylib"]
[package]
name = "untitled2"
version = "0.1.0"
......
#include <stdio.h>
#include "skaro.h"
int main()
{
printf("Hello, world!");
rust_main();
return 0;
}
from ctypes import cdll
lib = cdll.LoadLibrary("libskaro.so")
lib.main()
print("сделано!")
void rust_main(void);
......@@ -12,7 +12,8 @@ mod parse;
const CONNECTION: &'static str = "ws://127.0.0.1:8000/skaro_client/";
fn main() {
#[no_mangle]
pub extern fn rust_main() {
use std::thread;
use std::sync::mpsc::channel;
use std::io::stdin;
......
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-256-CBC,91AC153EC27400406FB22AC3C4877D6F
QokdCGLOHh/GS1ojlaPU1xo0vPdSDUrEWCTNlyH3NPrWi1Bb8QvhLaLp/G2KOVJ1
Kf/Ls5NuC/O+eFzktFGChVvTozoKrHEv0nNO7Wj0egnsihUvIFIDax+q3qQFWfCI
J1HmWZIJGZxCkptuP+W0nd5z3H7LvAY8GzGz7ho5E3DvCmoC5AjIw3HHoXgejO2P
72yRGSbX8wUPbh+5mQP9CHyHH68tvtnx0WnpvjGt8btMTQPxsG2htc0mFZMjQbtN
x6HTbCXxkXpvbmWfORnSsANOe12MD+KPBUezvDnByBPgAgqa3jZqPlyKcDNyq3xa
JvLGkxbzWpyaXtS541ZvVUpRgLn5GMwEcfdVi6yhXopiLdS1/nCMVRuikX85XeyT
yCIapADUrDqjaeQSO6a9d9EDEWt1ABorod8992XIKEqSn/ejvUBlcXMt92ZdOKzJ
p8AGEZ/+dOkB+dbAxGsXcZMdqDPhkYx8kGFjzkDOELlPcf1ObZ8vSDoV3WIVePUU
RntiqKJKqjVBFefLSsvrNYWYCuedQRFrq9RNn/teV1tFCVA4NTr4rQZR2vT8IGEV
ffGt9Co09tSRqyoiI2SccZrXjWMl5GVW5VrQaLpbjbfpG7n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CPmw4/SoK6O
HnBL/LdRNzR1ffGHvchAYFvuppY32e88V/a5okAjAmaXqyPv/b9bHt2/j6StqBYo
GFCluvFF4TVnunvwSLzPeqACkzg6IGfVovmah7Sd+VEuCmtkETBvDTAdxbcKFWL2
MtSj6tpdN4rPdW6PlVMX5jelFCUeeiTB/v9q8xqIVM/k7on+d6aPkpZV/zm2+7yS
mJhs2myGAnBBnOuZSDDqk5cQIRmc7Q1B2/SXujZOfjP1G9Qczs2H2SMSOHfv5cck
+NKfyknx/04R3K2AILSeseWPo1SAqUsx+3Un+1i9SqqVwej9EEVOFNSuoyMYns1Y
+QIDAQAB
-----END PUBLIC KEY-----
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment