This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::ffi::CString; | |
use std::mem::forget; | |
use wasmtime::{Instance, Module, Store}; | |
// | |
// Code of module which have to be compiled to wasm library | |
// | |
// use std::alloc::{alloc, Layout}; | |
// use std::ffi::CString; | |
// use std::mem::forget; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use futures::future::BoxFuture; | |
#[tokio::main] | |
async fn main() { | |
let words = vec!["one", "two"]; | |
let result = add(words, |word| { | |
Box::pin(async { | |
let mut kw = word; | |
kw.push("three"); | |
kw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[allow(dead_code)] | |
#[derive(Debug, Copy, Clone)] | |
struct A<'text> { | |
foo: &'text str, | |
baz: i32, | |
} | |
fn ptr_to_struct(p: *const A) { | |
let b: A = unsafe { *p }; // main part of this example! | |
println!("{:#?}", b); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"configurations": { | |
"run": { | |
"adapter": "vscode-node", | |
"configuration": { | |
"type": "node", | |
"request": "launch", | |
"name": "Jest Current File", | |
"program": "${workspaceFolder}/node_modules/.bin/jest", | |
"args": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
error_log = /dev/stdout | |
log_errors = On | |
display_errors = On | |
display_startup_errors = On | |
error_reporting = -1 | |
xdebug.remote_enable = On | |
xdebug.remote_autostart = On | |
xdebug.remote_host = 192.168.137.111 #Your pc network address | |
xdebug.remote_port = 9001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "2" | |
services: | |
application: | |
image: php | |
environment: | |
— PHP_IDE_CONFIG=serverName=app.local #this is main part. And yes this is whitout quotation marks - it's requiring - wroted by blood :). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.3" | |
volumes: | |
proxy: | |
networks: | |
proxy_network: | |
backend_network: #For connection another stacks to proxy. Should be created manualy. | |
external: true |