Size: a a a

2020 April 27

AZ

Alex Zhukovsky in rust_offtopic
сказал бы одно слово "плагины"
источник

EG

Emmanuel Goldstein in rust_offtopic
Я хочу как в питончике — подложил .so-файл и импортируешь обычным импортом
источник

AZ

Alex Zhukovsky in rust_offtopic
для плагинов - да, надо
источник

S

Soul in rust_offtopic
окунулся в nix
источник

p

polunin.ai in rust_offtopic
Так, я не верю вам и ирлу. Спрошу в ишью лучше, или поищу готовые ишью.
источник

EG

Emmanuel Goldstein in rust_offtopic
Было бы удобно, если бы был некий стабильный сабсет Rust ABI, в котором бы были, скажем, энумы, но который можно было бы использовать для интеропа
источник

EG

Emmanuel Goldstein in rust_offtopic
Типа #[repr(stable)]
источник

AZ

Alex Zhukovsky in rust_offtopic
polunin.ai
Так, я не верю вам и ирлу. Спрошу в ишью лучше, или поищу готовые ишью.
--crate-type=lib, #[crate_type = "lib"] - A Rust library will be produced. This is an ambiguous concept as to what exactly is produced because a library can manifest itself in several forms. The purpose of this generic lib option is to generate the "compiler recommended" style of library. The output library will always be usable by rustc, but the actual type of library may change from time-to-time. The remaining output types are all different flavors of libraries, and the lib type can be seen as an alias for one of them (but the actual one is compiler-defined).

--crate-type=dylib, #[crate_type = "dylib"] - A dynamic Rust library will be produced. This is different from the lib output type in that this forces dynamic library generation. The resulting dynamic library can be used as a dependency for other libraries and/or executables. This output type will create *.so files on linux, *.dylib files on osx, and *.dll files on windows.

--crate-type=cdylib, #[crate_type = "cdylib"] - A dynamic system library will be produced. This is used when compiling a dynamic library to be loaded from another language. This output type will create *.so files on Linux, *.dylib files on macOS, and *.dll files on Windows.
источник

EG

Emmanuel Goldstein in rust_offtopic
А для не `#[repr(stable)]`-типов ничего не гарантируется
источник

S

Soul in rust_offtopic
#[repr(C)]?
источник

EG

Emmanuel Goldstein in rust_offtopic
Нет.
источник

EG

Emmanuel Goldstein in rust_offtopic
#[repr(C)] слишком бедный
источник

AZ

Alex Zhukovsky in rust_offtopic
Emmanuel Goldstein
А для не `#[repr(stable)]`-типов ничего не гарантируется
"стабильные" типы тоже меняются
источник

AZ

Alex Zhukovsky in rust_offtopic
вон недавно запилили niche optimization для Option
источник

AZ

Alex Zhukovsky in rust_offtopic
если бы его стабилизировали то хуй вам а не оптимизация
источник

EG

Emmanuel Goldstein in rust_offtopic
Alex Zhukovsky
вон недавно запилили niche optimization для Option
Дайте мне StableOption, который FFI safe, и вертите обычный Option как хотите
источник

EG

Emmanuel Goldstein in rust_offtopic
FFIOption
источник

S

Soul in rust_offtopic
в Rust же компиляторное управление памятью, какой тут может быть интероп с нормальными языками, которые не знают о концепции феодального владения переменной
источник

AZ

Alex Zhukovsky in rust_offtopic
Emmanuel Goldstein
Дайте мне StableOption, который FFI safe, и вертите обычный Option как хотите
My usual response to “why is feature X not implemented?” is that of course all features are unimplemented until someone designs, implements, tests, documents and ships the feature, and no one has yet spent the money to do so.
источник

EG

Emmanuel Goldstein in rust_offtopic
Soul
в Rust же компиляторное управление памятью, какой тут может быть интероп с нормальными языками, которые не знают о концепции феодального владения переменной
Я хочу интероп Rust с Rust
источник